/* =========================================================
   Baseball Hot Stadium MVP
   css/stadium.css

   注意：
   - .bh-tabs / .bh-tab 是 common-ui.css 公版分頁
   - 這裡不要重寫 .bh-tabs / .bh-tab 本體樣式
   ========================================================= */

/* ================================
   Page layout
================================ */

.stadium-page-wrapper {
    width: 100%;
}

.stadium-page {
    width: 100%;
    padding: 0 10px 40px 0;
    box-sizing: border-box;
}

.stadium-main-tabs {
    margin: 12px 0 18px 0;
}

.stadium-tab-panel {
    display: none;
}

.stadium-tab-panel.active {
    display: block;
}

/* ================================
   Status
================================ */

.stadium-status-box {
    display: none;
    margin: 0 0 14px 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.stadium-status-box.active {
    display: block;
}

.stadium-status-box.success {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.stadium-status-box.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ================================
   Cards
================================ */

.stadium-card {
    background: #ffffff;
    border: 1px solid #d7dfd5;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.stadium-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.stadium-card-title {
    margin: 0;
    color: #174b18;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.stadium-card-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.stadium-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stadium-secondary-btn {
    background: #ffffff;
    color: #174b18;
    border: 1px solid #174b18;
    box-shadow: none;
}

.stadium-secondary-btn:hover {
    background: #eef7eb;
    filter: none;
}

.stadium-secondary-btn:disabled,
.stadium-small-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 640px) {
    .stadium-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .stadium-header-actions .stadium-small-btn {
        flex: 1;
    }
}

.stadium-small-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: #174b18;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(23, 75, 24, 0.22);
}

.stadium-small-btn:hover {
    filter: brightness(1.08);
}

.stadium-small-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ================================
   Empty blocks
================================ */

.stadium-empty-block,
.stadium-empty-row {
    color: #6b7280;
    font-weight: 700;
    text-align: center;
}

.stadium-empty-block {
    padding: 26px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
}

.stadium-empty-row {
    padding: 22px !important;
}

/* ================================
   Current stadium info
================================ */

.stadium-current-box,
.stadium-contract-box {
    width: 100%;
}

.stadium-current-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 16px;
}

.stadium-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 34%),
        linear-gradient(135deg,
            var(--stadium-team-secondary, #286d22) 0%,
            var(--stadium-team-primary, #174b18) 48%,
            var(--stadium-team-primary, #174b18) 62%,
            var(--stadium-team-secondary-dark, #0f2f12) 100%);
    color: var(--stadium-hero-text, #ffffff);
    min-height: 180px;
    box-sizing: border-box;
}

.stadium-hero-panel::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -42px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.stadium-hero-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 900;
}

.stadium-hero-title {
    position: relative;
    z-index: 1;
    margin: 14px 0 4px 0;
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: 0.03em;
}

.stadium-hero-subtitle {
    position: relative;
    z-index: 1;
    color: var(--stadium-hero-subtext, rgba(255, 255, 255, 0.82));
    font-size: 14px;
    font-weight: 800;
}

.stadium-hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.stadium-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--stadium-hero-pill-bg, rgba(255, 255, 255, 0.14));
    color: var(--stadium-hero-text, #ffffff);
    font-size: 12px;
    font-weight: 900;
}

.stadium-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stadium-info-item {
    border-radius: 14px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.stadium-info-item span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.stadium-info-item strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 18px;
    font-weight: 1000;
}

.stadium-info-item small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

/* ================================
   Summary
================================ */

.stadium-weekly-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.stadium-weekly-summary span {
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.stadium-weekly-summary strong,
.stadium-money {
    font-weight: 1000;
}

.stadium-money.income {
    color: #15803d;
}

.stadium-money.expense {
    color: #b91c1c;
}

.stadium-money.positive {
    color: #15803d;
}

.stadium-money.negative {
    color: #b91c1c;
}

/* ================================
   Tables
================================ */

.stadium-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.stadium-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    background: #ffffff;
}

.stadium-table th {
    padding: 11px 10px;
    background: #174b18;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.stadium-table th:first-child {
    border-top-left-radius: 10px;
}

.stadium-table th:last-child {
    border-top-right-radius: 10px;
}

.stadium-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}

.stadium-table tbody tr:hover {
    background: #f8fafc;
}

.stadium-table .money-col {
    text-align: right;
}

.stadium-table td.money-col {
    font-weight: 1000;
}

/* ================================
   Contract options
================================ */

.stadium-contract-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stadium-contract-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 2px solid #dbe4d7;
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stadium-contract-option:hover {
    transform: translateY(-2px);
    border-color: #77a96b;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.09);
}

.stadium-contract-option.selected {
    border-color: #174b18;
    background: #f1f8ef;
    box-shadow: 0 10px 24px rgba(23, 75, 24, 0.12);
}

.stadium-contract-option input {
    margin-top: 4px;
    accent-color: #174b18;
}

.stadium-contract-option strong {
    display: block;
    color: #174b18;
    font-size: 15px;
    font-weight: 1000;
}

.stadium-contract-option small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.stadium-adoption-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

/* ================================
   Stadium type cards
================================ */

.stadium-type-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

/* 上排三張：每張佔 2 格 */
.stadium-type-card:nth-child(1),
.stadium-type-card:nth-child(2),
.stadium-type-card:nth-child(3) {
    grid-column: span 2;
}

/* 下排兩張：每張佔 3 格，剛好充滿一整排 */
.stadium-type-card:nth-child(4),
.stadium-type-card:nth-child(5) {
    grid-column: span 3;
}

.stadium-type-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    border-radius: 18px;
    border: 1px solid #d7dfd5;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.stadium-type-card:hover {
    transform: translateY(-3px);
    border-color: #77a96b;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.stadium-type-card.current {
    border: 2px solid #174b18;
}

.stadium-type-card.locked {
    opacity: 0.82;
}

.stadium-type-card-header {
    padding: 16px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.38), transparent 36%),
        linear-gradient(135deg, #174b18, #2a721f);
    color: #ffffff;
}

.stadium-type-card.locked .stadium-type-card-header {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.32), transparent 36%),
        linear-gradient(135deg, #374151, #111827);
}

.stadium-type-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.stadium-type-label {
    margin: 0;
    font-size: 18px;
    font-weight: 1000;
    letter-spacing: 0.02em;
}

.stadium-type-short {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
}

.stadium-type-badge-area {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-height: 28px;
}

.stadium-signed-stamp {
    position: absolute;
    top: 12px;
    right: 62px;
    z-index: 5;
    width: 125px;
    height: auto;
    display: block;
    transform: rotate(-10deg);
    opacity: 0.86;
    mix-blend-mode: multiply;
    filter: contrast(1.08) saturate(1.05) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.12));
    pointer-events: none;
}

.stadium-vip-badge,
.stadium-current-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 1000;
    white-space: nowrap;
}

.stadium-vip-badge {
    background: #facc15;
    color: #422006;
}

.stadium-current-badge {
    background: var(--stadium-hero-pill-bg, rgba(255, 255, 255, 0.18));
    color: var(--stadium-hero-text, #ffffff);
}

.stadium-type-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.stadium-type-desc {
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
    min-height: 0;
    margin-bottom: 8px;
}

.stadium-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px 0;
}

.stadium-type-tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef7eb;
    color: #174b18;
    font-size: 11px;
    font-weight: 900;
}

.stadium-type-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
}

.stadium-type-stat {
    padding: 9px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.stadium-type-stat span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.stadium-type-stat strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 13px;
    font-weight: 1000;
}

.stadium-rating-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 12px;
}

.stadium-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

.stadium-rating-row strong {
    color: #174b18;
    font-weight: 1000;
    white-space: nowrap;
}

.stadium-type-actions {
    margin-top: auto;
    padding-top: 14px;
}

.stadium-adopt-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #174b18;
    color: #ffffff;
    font-size: 14px;
    font-weight: 1000;
    cursor: pointer;
}

.stadium-adopt-btn:hover {
    filter: brightness(1.08);
}

.stadium-adopt-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    filter: none;
}

/* ================================
   Future / support
================================ */

.stadium-future-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

.stadium-future-box p {
    margin: 0 0 8px 0;
}

.stadium-future-box p:last-child {
    margin-bottom: 0;
}

.stadium-empty-feature {
    padding: 46px 20px;
    text-align: center;
    border-radius: 18px;
    background:
        radial-gradient(circle at top, rgba(23, 75, 24, 0.08), transparent 32%),
        #f8fafc;
    border: 1px dashed #cbd5e1;
}

.stadium-empty-feature-icon {
    font-size: 44px;
    margin-bottom: 10px;
}

.stadium-empty-feature h3 {
    margin: 0 0 8px 0;
    color: #174b18;
    font-size: 22px;
    font-weight: 1000;
}

.stadium-empty-feature p {
    margin: 0 auto;
    max-width: 560px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

/* ================================
   Badges / labels
================================ */

.stadium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 1000;
    white-space: nowrap;
}

.stadium-badge.green {
    background: #dcfce7;
    color: #166534;
}

.stadium-badge.gray {
    background: #f3f4f6;
    color: #374151;
}

.stadium-badge.gold {
    background: #fef3c7;
    color: #92400e;
}

.stadium-badge.red {
    background: #fee2e2;
    color: #991b1b;
}

/* ================================
   Responsive
================================ */

@media (max-width: 960px) {
    .stadium-current-layout {
        grid-template-columns: 1fr;
    }

    .stadium-contract-options {
        grid-template-columns: 1fr;
    }

    .stadium-type-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .stadium-type-card:nth-child(1),
    .stadium-type-card:nth-child(2),
    .stadium-type-card:nth-child(3),
    .stadium-type-card:nth-child(4),
    .stadium-type-card:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .stadium-page {
        padding-right: 0;
    }

    .stadium-card {
        padding: 14px;
        border-radius: 14px;
    }

    .stadium-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stadium-small-btn {
        width: 100%;
    }

    .stadium-info-grid {
        grid-template-columns: 1fr;
    }

    .stadium-type-grid {
        grid-template-columns: 1fr;
    }

    .stadium-type-card:nth-child(1),
    .stadium-type-card:nth-child(2),
    .stadium-type-card:nth-child(3),
    .stadium-type-card:nth-child(4),
    .stadium-type-card:nth-child(5) {
        grid-column: span 1;
    }

    .stadium-hero-title {
        font-size: 24px;
    }

    .stadium-table {
        min-width: 680px;
    }
}