/* 스포츠 베팅 페이지 스타일 — compact horizontal layout */

.sports-betting-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* 종목 필터 버튼 */
.sport-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f4f5f7;
    border: 1px solid #e0e3e8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-size: 0.8125rem;
}

.sport-filter-btn:hover {
    background: #e8eaee;
    border-color: #cfd3da;
}

.sport-filter-btn.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

.sport-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.sport-filter-btn .iconify {
    font-size: 0.875rem;
}

.sport-name {
    font-weight: 600;
    font-size: 0.8125rem;
}

.sport-count {
    font-size: 0.6875rem;
    opacity: 0.55;
    font-weight: 500;
}

.sport-filter-btn.active .sport-count {
    opacity: 0.8;
}

/* 헤더 */
.betting-main {
    width: 100%;
}

.betting-header {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.betting-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.75rem 0;
}

.sport-filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sport-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.matches-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── 경기 카드 ── */
.match-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.15s;
}

.match-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.league-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.match-time {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
}

/* ── 베팅 행 (수평 테이블 스타일) ── */
.bet-row {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 4px;
}

.bet-row:last-child {
    margin-bottom: 0;
}

.bet-row-handicap,
.bet-row-underover,
.bet-row-firstgoal {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
}

.bet-type-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: #f0f1f3;
    color: #777;
    border-radius: 4px;
    font-size: 0.625rem;
    width: 52px;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

/* ── 베팅 버튼 (핵심: 수평·컴팩트) ── */
.bet-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 10px;
    background: #fafbfc;
    border: 1px solid #e2e4e8;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.12s;
    min-height: 0;
    line-height: 1;
}

.bet-option:hover {
    border-color: #3b82f6;
    background: #f0f5ff;
}

.bet-option.selected {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

.bet-option.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* 팀명 */
.team-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #222;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.bet-option.selected .team-name {
    color: #fff;
}

/* 홈/원정 등 라벨 — 숨김 (팀명으로 충분) */
.bet-label {
    display: none;
}

/* 핸디캡 값 */
.handicap-value {
    font-size: 0.6875rem;
    color: #ef4444;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.bet-option.selected .handicap-value {
    color: #fca5a5;
}

/* 배당률 */
.odds-value {
    display: inline-block;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #3b82f6;
    min-width: 48px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
}

.bet-option:hover .odds-value {
    border-color: #93bbfc;
}

.bet-option.selected .odds-value {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── 빈 상태 ── */
.empty-matches {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.empty-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 0.75rem;
}

.empty-matches p {
    margin: 0;
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 500;
}

/* ── 카트 토글 버튼 ── */
.cart-toggle-btn {
    width: 52px;
    height: 52px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.cart-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.35);
}

.cart-count-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* ── 베팅 카트 ── */
.betting-cart {
    position: fixed;
    bottom: -100%;
    right: 1.5rem;
    width: 380px;
    max-width: calc(100vw - 3rem);
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    border-bottom: none;
    transition: bottom 0.25s ease-out;
    z-index: 1000;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.betting-cart.active {
    bottom: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background: #1a1a2e;
    border-radius: 12px 12px 0 0;
}

.cart-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.cart-close {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
}

.cart-close:hover {
    background: rgba(255,255,255,0.25);
}

.cart-close .iconify {
    font-size: 1rem;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.cart-items {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #eee;
    gap: 8px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-league {
    font-size: 0.625rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-match {
    font-size: 0.75rem;
    color: #222;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-bet {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-label {
    padding: 1px 6px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 600;
}

.cart-item-odds {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 700;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

.cart-item-remove .iconify {
    font-size: 0.875rem;
}

.cart-amount-section {
    margin-bottom: 0.75rem;
}

.cart-amount-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.cart-amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e0e3e8;
    border-radius: 6px;
    padding: 6px 10px;
    background: #fff;
    transition: border-color 0.15s;
}

.cart-amount-input-wrapper:focus-within {
    border-color: #3b82f6;
}

.cart-amount-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
}

.cart-amount-input::placeholder {
    color: #bbb;
}

.cart-amount-unit {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #eee;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
}

.cart-summary-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111;
}

.cart-expected-win {
    color: #059669;
    font-size: 1rem;
}

.cart-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.place-bet-btn {
    width: 100%;
    padding: 10px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.place-bet-btn:hover {
    background: #2a2a44;
}

.place-bet-btn:active {
    transform: scale(0.98);
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
    .betting-cart {
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}

@media (max-width: 768px) {
    .sports-betting-wrapper {
        padding: 0.75rem;
    }

    .bet-row {
        flex-wrap: wrap;
    }

    .bet-type-label {
        width: 100%;
        margin-bottom: 3px;
        padding: 3px 0;
    }

    .bet-option {
        flex: 1 1 calc(50% - 2px);
        min-width: 0;
    }

    .betting-cart {
        max-height: 90vh;
    }

    .sport-filter-section {
        gap: 4px;
    }

    .sport-filter-btn {
        padding: 5px 10px;
    }
}

/* ── 경기 결과 스타일 ── */
.match-card-result {
    margin-bottom: 1rem;
}

.match-result-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 0.75rem;
}

.result-team-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.result-team-wrapper.winner {
    background: rgba(26,26,46,0.06);
    border: 1px solid #1a1a2e;
}

.result-team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
}

.result-team-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.result-team-wrapper.winner .result-team-name {
    color: #1a1a2e;
}

.result-winner-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.result-winner-badge .iconify {
    font-size: 0.75rem;
}

.result-score-large {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.result-team-wrapper.winner .result-score-large {
    color: #1a1a2e;
}

.result-vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-shrink: 0;
    min-width: 60px;
}

.result-vs-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.result-draw-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f59e0b;
    color: #fff;
    border-radius: 50%;
    font-size: 0.875rem;
}

.result-draw-badge .iconify {
    font-size: 1rem;
}

.match-result-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #eee;
    flex-wrap: wrap;
}

.result-summary-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.result-summary-draw {
    background: rgba(245,158,11,0.1);
    color: #d97706;
    border: 1px solid rgba(245,158,11,0.25);
}

.result-summary-winner {
    background: rgba(26,26,46,0.06);
    color: #1a1a2e;
    border: 1px solid rgba(26,26,46,0.18);
}

.result-summary-score {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.result-summary-item .iconify {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .match-result-display {
        flex-direction: column;
        gap: 0.75rem;
    }

    .result-team-wrapper {
        width: 100%;
        max-width: 280px;
    }

    .result-score-large {
        font-size: 2rem;
    }

    .result-vs-divider {
        width: 100%;
        flex-direction: row;
        min-width: auto;
    }

    .match-result-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .result-summary-item {
        justify-content: center;
    }
}
