/* ===================================================================
   J-SAM MULTI-BET ADDON
   Shares design tokens with the core plugin (gold/purple, dark).
   =================================================================== */

#jsam-floating-slip, #jsam-floating-slip * {
    box-sizing: border-box;
}

/* "Add to Slip" button, docked next to the odds box */
.jsam-add-slip-btn {
    background: rgba(255,198,0,0.15) !important;
    border: 1px solid rgba(255,198,0,0.4) !important;
    color: #ffc600 !important;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 800;
    margin-top: 4px;
    min-width: unset !important;
    border-radius: 6px !important;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s;
}

.jsam-add-slip-btn:hover {
    background: #ffc600 !important;
    color: #25003e !important;
    transform: translateY(-1px);
}

/* Floating Slip Container */
#jsam-floating-slip {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #1d0030;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 35px rgba(0,0,0,0.5);
    z-index: 99999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,198,0,0.18);
    border-bottom: none;
}

.jsam-slip-collapsed {
    transform: translateY(calc(100% - 46px));
}

.jsam-slip-header {
    background: linear-gradient(135deg, #ffc600, #ff9d00);
    color: #25003e;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#jsam-count {
    background: rgba(37,0,62,0.2);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 12px;
}

.jsam-toggle-slip {
    font-size: 12px;
    display: inline-flex;
    transition: transform .2s ease;
}
.jsam-toggle-slip--up { transform: rotate(180deg); }
.jsam-slip-icon { vertical-align: -2px; margin-right: 2px; }

.jsam-slip-body {
    padding: 16px;
    max-height: 420px;
    overflow-y: auto;
}

#jsam-selections {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

#jsam-selections li {
    background: rgba(255,255,255,0.04);
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #ffc600;
}

.jsam-slip-empty {
    border-left: none !important;
    background: transparent !important;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    text-align: center;
    padding: 14px 0 !important;
}

.item-info { flex: 1; font-size: 13px; line-height: 1.3; min-width: 0; }
.item-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-info small { display: block; color: rgba(255,255,255,0.45); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-odds { background: rgba(0,0,0,0.35); padding: 3px 8px; border-radius: 6px; font-weight: 800; color: #ffc600; margin: 0 10px; font-size: 12px; }
.jsam-remove-item { cursor: pointer; color: #e74c3c; font-weight: 800; font-size: 18px; line-height: 1; }

.jsam-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.jsam-stats span { color: #fff; font-weight: 800; }

#jsam-multi-stake {
    width: 100%;
    margin-bottom: 10px;
    background: #000;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
}

#jsam-multi-stake:focus {
    outline: none;
    border-color: #ffc600;
}

#jsam-place-multi-btn {
    width: 100%;
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    color: #fff !important;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s;
}

#jsam-place-multi-btn:hover {
    transform: translateY(-1px);
}

#jsam-place-multi-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#jsam-multi-msg {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    min-height: 16px;
}

.jsam-slip-msg-success { color: #2ecc71; }
.jsam-slip-msg-error { color: #e74c3c; }

.jsam-slip-clear-row {
    text-align: right;
    margin-top: 8px;
}

.jsam-slip-clear-row a {
    color: #e74c3c;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.jsam-slip-clear-row a:hover {
    text-decoration: underline;
}

/* ===================================================================
   MY ACCUMULATORS (ticket history list)
   =================================================================== */
.jsam-mb-history {
    max-width: 760px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.jsam-ticket-card {
    background: #1d0030;
    border: 1px solid rgba(255,198,0,0.12);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.jsam-ticket-card:hover {
    border-color: rgba(255,198,0,0.3);
}

.jsam-ticket-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    flex-wrap: wrap;
}

.jsam-ticket-id-block {
    line-height: 1.4;
    min-width: 110px;
}

.jsam-ticket-id {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: block;
}

.jsam-ticket-date {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

.jsam-ticket-figures {
    text-align: right;
    line-height: 1.5;
}

.jsam-ticket-stake {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.jsam-ticket-stake strong {
    color: #fff;
}

.jsam-ticket-potwin {
    font-size: 13px;
    font-weight: 800;
    color: #2ecc71;
}

.jsam-mb-status-badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.jsam-mb-status-pending { background: rgba(52,152,219,0.18); color: #5dade2; }
.jsam-mb-status-win { background: rgba(46,204,113,0.18); color: #2ecc71; }
.jsam-mb-status-loss { background: rgba(231,76,60,0.18); color: #e74c3c; }
.jsam-mb-status-void { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

.jsam-ticket-chevron {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    transition: transform 0.2s;
}

.jsam-ticket-card.jsam-ticket-open .jsam-ticket-chevron {
    transform: rotate(180deg);
}

.jsam-ticket-body {
    display: none;
    padding: 16px;
    background: #170027;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.jsam-ticket-legs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jsam-ticket-legs li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 10px 0;
    color: #fff;
}

.jsam-ticket-legs li:last-child {
    border-bottom: none;
}

.jsam-ticket-legs li.jsam-leg-lost {
    color: rgba(255,255,255,0.4);
}

.jsam-leg-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.jsam-leg-odds {
    font-weight: 800;
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 6px;
    color: #ffc600;
    font-size: 12px;
}

.jsam-ticket-legs li.jsam-leg-lost .jsam-leg-odds {
    color: rgba(255,255,255,0.35);
}

.jsam-leg-event {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-left: 24px;
    margin-top: 2px;
}

.jsam-cancel-block {
    margin-top: 16px;
    text-align: right;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
}

.jsam-cancel-warning {
    font-size: 11px;
    color: #ff8a80;
    margin: 0 0 10px 0;
    text-align: left;
}

.jsam-cancel-ticket-btn {
    background: rgba(231,76,60,0.15);
    color: #ff6b6b;
    border: 1px solid rgba(231,76,60,0.4);
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    transition: all 0.15s;
}

.jsam-cancel-ticket-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 480px) {
    #jsam-floating-slip {
        right: 12px;
        width: calc(100vw - 24px);
    }

    .jsam-ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .jsam-ticket-figures {
        text-align: left;
    }
}
