/* Grand Prix Package Cards + Compare Tray + Comparison Table.
   Matches the site's existing light-theme GP palette (see gp-hub.css tokens). */

.grand-prix-packages {
    --gpc-navy: #0b1f3a;
    --gpc-text-muted: #5c6478;
    --gpc-border: rgba(11,31,58,0.12);
    --gpc-red: #c8102e;
    --gpc-bg-alt: #ffffff;
}

.gp-packages-empty {
    text-align: center;
    color: var(--gpc-text-muted);
}

.gp-package-zone {
    margin-top: 48px;
}
.gp-package-zone:first-of-type {
    margin-top: 24px;
}
.gp-package-zone h2 {
    font-size: 1.5rem;
    color: var(--gpc-navy);
    margin: 0 0 20px;
}

.gp-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.gp-package-card {
    background: var(--gpc-bg-alt);
    border: 1px solid var(--gpc-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.gp-package-card:hover {
    box-shadow: 0 8px 24px rgba(11,31,58,0.1);
}

.gp-package-image {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    background: #eee;
}

.gp-package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gp-package-type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--gpc-navy);
    color: #fff;
}

.gp-package-type-tag--hospitality {
    background: #a6812f;
}

.gp-package-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.gp-package-body h3 {
    margin: 0;
}

.gp-package-tier-label {
    margin: 0;
    color: var(--gpc-text-muted);
    font-size: 0.9rem;
}

.gp-package-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gp-package-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.gp-package-price .amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gpc-navy);
}

.gp-package-price .basis {
    color: var(--gpc-text-muted);
    font-size: 0.85rem;
}

.gp-package-price--tbc {
    font-size: 1rem;
    color: var(--gpc-text-muted);
}

.gp-package-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gp-package-compare {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.gp-package-compare.is-disabled,
.gp-package-compare[data-locked-out] {
    opacity: 0.4;
    cursor: not-allowed;
}

.gp-package-compare input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Persistent compare tray */
.gp-compare-tray {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--gpc-navy, #0b1f3a);
    color: #fff;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}

.gp-compare-tray[hidden] {
    display: none;
}

.gp-compare-tray-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.gp-compare-tray-count {
    font-weight: 700;
    white-space: nowrap;
}

.gp-compare-tray-items {
    flex: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gp-compare-tray-item {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gp-compare-tray-item button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.gp-compare-tray-actions {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.gp-compare-tray-clear {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
}

.gp-compare-tray-compare[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comparison modal */
.gp-compare-modal[hidden] {
    display: none;
}

.gp-compare-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-compare-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11,31,58,0.55);
}

.gp-compare-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 900px;
    width: calc(100% - 32px);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 32px 24px 24px;
}

.gp-compare-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--gpc-navy, #0b1f3a);
}

.gp-compare-table-wrap {
    overflow-x: auto;
}

.gp-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.gp-compare-table th,
.gp-compare-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gpc-border, rgba(11,31,58,0.12));
    vertical-align: top;
}

.gp-compare-table th.gp-compare-row-label {
    font-weight: 600;
    color: var(--gpc-text-muted, #5c6478);
    white-space: nowrap;
    position: sticky;
    left: 0;
    background: #fff;
}

.gp-compare-table thead th {
    font-size: 1rem;
    color: var(--gpc-navy, #0b1f3a);
}

/* Mobile: compare tray becomes a slim bottom bar; sits above the mobile package drawer */
@media (max-width: 767px) {
    .gp-compare-tray-inner {
        padding: 10px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .gp-compare-tray-items {
        order: 3;
        width: 100%;
    }

    .gp-compare-modal-panel {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .gp-compare-table th.gp-compare-row-label {
        min-width: 120px;
    }
}

/* Anchor nav */
.gp-anchor-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--gpc-border, rgba(11,31,58,0.12));
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.gp-anchor-nav-inner {
    display: inline-flex;
    gap: 8px;
    padding: 10px 20px;
}

.gp-anchor-nav a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gpc-navy, #0b1f3a);
    text-decoration: none;
    white-space: nowrap;
}

.gp-anchor-nav a.is-active,
.gp-anchor-nav a:hover {
    background: var(--gpc-navy, #0b1f3a);
    color: #fff;
}
