/* ================================
   Marine Marvels Calculator
   Boost bar, season selector, marvel table
   ================================ */

.marvel-boosts-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-bottom: 0.75rem;
}

.marvel-boost-btn {
    padding: 0.4rem 0.6rem;
    border: 1px solid #c4a97d;
    border-radius: 6px;
    background: #f7f3eb;
    color: #5a4a3a;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.marvel-boost-btn:hover {
    background: #ede5d5;
}

.marvel-boost-btn.active {
    background: #4a7c3f;
    color: #fff;
    border-color: #3a6830;
}

.marvel-boost-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.marvel-boost-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.marvel-boost-btn-label {
    font-weight: 700;
}

/* Boosts section two-card layout */
.marvel-boosts-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.xp-info-panel.marvel-boosts-controls,
.xp-info-panel.marvel-catch-info {
    background: rgba(214,203,184,0.06);
}

.marvel-boosts-controls {
    flex: 0 1 420px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.marvel-catch-info {
    flex: 1 1 620px;
    min-width: 320px;
    max-width: 920px;
}

.marvel-boosts-actions {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.marvel-boosts-controls .marvel-boosts-bar,
.marvel-boosts-controls .marvel-season-bar {
    justify-content: flex-end;
    margin-bottom: 0;
}

.marvel-catch-info-row {
    font-size: 0.75rem;
    line-height: 1.4;
}

.marvel-controls-group {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.marvel-controls-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.marvel-controls-explainer {
    font-size: 0.68rem;
    line-height: 1.4;
}

.marvel-controls-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.marvel-catch-info-label {
    font-weight: 600;
}

.marvel-catch-info-avg {
    color: #c0392b;
    font-weight: 600;
}

/* "Expected / Catches" two-line header cell */
.marvel-th-wrap {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.marvel-rod-cost {
    font-size: 0.8rem;
    color: #6a5a4a;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.1rem;
}

.marvel-rod-cost-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 1px;
}
.marvel-rod-cost-value {
    font-weight: 600;
    color: var(--negative);
}

.marvel-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.marvel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.marvel-table thead th {
    background: #e8e0d0;
    color: #4a3a2a;
    font-weight: 600;
    padding: 0.25rem 0.35rem;
    text-align: left;
    border-bottom: 2px solid #c4a97d;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.marvel-table tbody td {
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid #e8e0d0;
    vertical-align: middle;
    white-space: nowrap;
}

.marvel-table tbody tr {
    background: rgba(255, 253, 248, 0.35);
}

/* Alternating stripe per marvel group (every other pair of 2 rows) */
.marvel-table tbody tr:nth-child(4n+3),
.marvel-table tbody tr:nth-child(4n+4) {
    background: rgba(245, 240, 229, 0.45);
}

.marvel-table tbody tr:hover {
    background: #ede6d6;
}

.marvel-name-cell {
    font-weight: 600;
    color: #4a3a2a;
    background: #faf7f0;
    border-right: 2px solid #d4c5a9;
    white-space: nowrap;
    vertical-align: middle;
}

.marvel-bonus {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

.marvel-bonus-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.marvel-bonus-text {
    font-size: 0.65rem;
    color: #3a7c2a;
    font-weight: 600;
}

.marvel-fish-name {
    font-weight: 500;
    color: #4a3a2a;
}

.marvel-fish-seasons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 0.3rem;
}

.marvel-fish-seasons.stacked {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    align-items: center;
}

.marvel-fish-season-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.marvel-fish-type {
    font-size: 0.65rem;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    background: #e8e0d0;
    color: #6a5a4a;
    text-transform: uppercase;
    margin-left: 0.3rem;
}

.marvel-chance-boosted {
    color: #4a7c3f;
    font-weight: 600;
}

/* Marvel Season Selector */
.marvel-season-bar {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.marvel-header-season-bar {
    margin-left: auto;
}

.marvel-season-btn {
    padding: 0.3rem 0.45rem;
    border: 1px solid #c4a97d;
    border-radius: 5px;
    background: transparent;
    color: #6a5a4a;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 34px;
}

.marvel-season-btn:hover {
    background: #ede5d5;
}

.marvel-season-btn.active {
    background: #4a7c3f;
    color: #fff;
    border-color: #3a6830;
    font-weight: 600;
}

.marvel-season-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.marvel-table .global-tooltip-trigger { cursor: help; }

/* ── Marvel column group headers ── */
.marvel-group-header {
    text-align: center !important;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.25rem;
    border-bottom: 1px solid #c4a97d;
}

.marvel-group-guar-total {
    text-align: center !important;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.25rem;
    border-bottom: 1px solid #c4a97d;
    background: rgba(74,124,63,0.08);
}

.marvel-group-guar {
    background: rgba(74,124,63,0.08);
    border-left: 2px solid #d4c5a9;
}

.marvel-group-normal {
    background: rgba(74,112,144,0.08);
    border-left: 2px solid #d4c5a9;
}

.marvel-guar-sub {
    text-align: center !important;
    font-size: 0.65rem;
    background: rgba(74,124,63,0.05);
}

.marvel-normal-sub {
    text-align: center !important;
    font-size: 0.65rem;
    background: rgba(74,112,144,0.05);
}

.marvel-table thead th.marvel-group-header {
    vertical-align: bottom;
    text-align: center;
}

.marvel-group-border-left {
    border-left: 2px solid #d4c5a9;
}

.marvel-table thead th.marvel-th-base {
    text-align: center;
    vertical-align: bottom;
}

.marvel-th-base.marvel-th-wrap {
    vertical-align: bottom;
}

#marvelCards {
    margin-top: 16px;
}

.marvel-th-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 1px;
    image-rendering: pixelated;
}

.marvel-catches-sub {
    text-align: center !important;
    font-size: 0.65rem;
}

.marvel-guar-cell {
    text-align: center;
}

.marvel-normal-cell {
    text-align: center;
    font-family: monospace;
    font-size: 0.75rem;
}

.marvel-guar-first {
    border-left: 2px solid #d4c5a9;
}

.marvel-normal-first {
    border-left: 2px solid #d4c5a9;
}

.marvel-catch-input {
    width: 42px;
    padding: 2px 3px;
    border: 1px solid #d4c5a9;
    border-radius: 3px;
    background: #fffdf8;
    color: #4a3a2a;
    font-size: 0.7rem;
    text-align: center;
    font-family: monospace;
}

.marvel-catch-input:focus {
    outline: none;
    border-color: #4a7c3f;
    box-shadow: 0 0 3px rgba(74,124,63,0.3);
}

/* Fish and bait icons in marvel table */
.marvel-fish-icon,
.marvel-bait-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
    margin-right: 3px;
}

.marvel-bait-icon {
    width: 16px;
    height: 16px;
}

/* Row separator between marvel groups */
.marvel-table tbody tr.marvel-group-first td {
    border-top: 2px solid #d4c5a9;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .marvel-boosts-controls {
        min-width: 100%;
    }
    .marvel-boosts-bar {
        flex-wrap: wrap;
    }
    .marvel-boosts-controls {
        align-items: flex-start;
    }
    .marvel-boosts-controls .marvel-boosts-bar,
    .marvel-boosts-controls .marvel-season-bar {
        justify-content: flex-start;
    }
    .marvel-controls-group {
        flex-direction: column;
    }
    .marvel-catch-info {
        min-width: 100%;
    }
    .marvel-table {
        font-size: 0.7rem;
    }
    .marvel-table thead th {
        font-size: 0.65rem;
        padding: 0.2rem 0.2rem;
    }
    .marvel-table tbody td {
        padding: 0.25rem 0.3rem;
    }
}
