﻿/* ==========================================
   SECTION 1 — TOUR CARD (LIST PAGE)
========================================== */

/* Card wrapper */
.tour-wrapper {
    position: relative !important;
    height: 100% !important;
    overflow: hidden;
    border-radius: 12px;
}

/* Card image */
.tour-banner {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.45s ease;
}

/* Hover zoom */
.tour-card:hover .tour-banner {
    transform: scale(1.12);
}

/* Card hover motion */
.tour-card {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Title overlay */
.tour-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;

    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    border-top: 1px solid rgba(255,255,255,0.25);
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    transition: background 0.3s ease;
}

.tour-card:hover .tour-title-overlay {
    background: rgba(0, 0, 0, 0.55);
}

/* Card size */
.tour-grid .tour-card {
    width: 320px;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
}



/* ==========================================
   SECTION 2 — GLASS EFFECT COMPONENTS
========================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    animation: floatCard 0.6s ease-out;
}

.glass-pill {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 16px 22px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    margin-top: 25px;
    margin-bottom: 25px;
    animation: floatRewards 0.6s ease-out;
}



/* ==========================================
   SECTION 3 — PAGE LAYOUT (GRID & BANNER)
========================================== */

.tour-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: flex-start;
}

.tour-description p {
    margin-bottom: 8px;
    line-height: 1.45;
}

.tour-banner-wrapper {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 20px;
}

.tour-banner-large {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}



/* ==========================================
   SECTION 4 — DURATION PILL
========================================== */

.tour-duration-pill {
    grid-column: 1 / -1;
    padding: 20px;
}

.duration-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.duration-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.duration-item {
    display: flex;
    flex-direction: column;
}

.duration-label {
    font-weight: 600;
    opacity: 0.8;
}

.duration-value {
    font-size: 1.1rem;
}

/* Countdown */
.tour-countdown {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}



/* ==========================================
   SECTION 5 — REWARDS PILL
========================================== */

.rewards-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rewards-row {
    display: flex;
    gap: 30px;
    align-items: center;
}

.reward-item {
    display: flex;
    gap: 6px;
    font-size: 0.95rem;
}

.reward-label {
    font-weight: 600;
    opacity: 0.85;
}

.reward-value {
    font-weight: 500;
}



/* ==========================================
   SECTION 6 — STATUS BADGE
========================================== */

.tour-status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 20px;
    color: white;
}

.tour-status-badge.not_started { background: #888; }
.tour-status-badge.active      { background: #28a745; }
.tour-status-badge.expired     { background: #dc3545; }



/* ==========================================
   SECTION 7 — LEGS TABLE
========================================== */

.tour-legs-pill {
    grid-column: 1 / -1;
    padding: 25px;
    margin-top: 40px;
}

.pill-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.tour-legs-table {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}



/* ==========================================
   SECTION 8 — RESPONSIVE LAYOUT
========================================== */

/* Desktop: Duration + Rewards side-by-side */
@media (min-width: 992px) {
    .tour-duration-pill,
    .tour-rewards-pill {
        grid-column: span 1;
    }

    .tour-top-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

/* Mobile: full width */
@media (max-width: 991px) {
    .tour-duration-pill,
    .tour-rewards-pill {
        grid-column: 1 / -1;
    }
}



/* ==========================================
   SECTION 9 — ANIMATIONS
========================================== */

@keyframes floatCard {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatRewards {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}



/* ==========================================
   SECTION 10 — LEGS TABLE PREMIUM STYLE
========================================== */

/* 1. BOOK LEG BUTTON */
.tour-legs-table .btn-success,
.book-now-btn,
.tour-legs-table button {
    background: #28a745 !important;
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tour-legs-table .btn-success:hover,
.book-now-btn:hover,
.tour-legs-table button:hover {
    background: #1e7e34 !important;
}


/* HEADER LINE UNDER TITLES */
.tour-legs-table thead th {
    text-align: left !important;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255,255,255,0.25);
}



/* 3. LEFT ALIGN HEADERS */
.tour-legs-table thead th {
    text-align: left !important;
}


/* OPTIONAL — PREMIUM ROW SPACING */
.tour-legs-table td {
    padding: 12px 10px;
}

/* OPTIONAL — LIGHT HOVER EFFECT */
.tour-legs-table tbody tr:hover {
    background: rgba(255,255,255,0.08);
    transition: 0.2s ease;
}



/* ==========================================
   SECTION 11 — TOUR STATUS LABEL (CARDS)
========================================== */

.tour-status-label {
    position: absolute;
    top: 10px;
    right: 10px;

    padding: 6px 12px;
    border-radius: 12px;

    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    border: 1px solid rgba(255,255,255,0.25);
    z-index: 20;
}

/* Status colors */
.tour-status-label.active {
    background: rgba(40, 167, 69, 0.85);
}

.tour-status-label.not_started {
    background: rgba(0, 123, 255, 0.85);
}

.tour-status-label.expired {
    background: rgba(220, 53, 69, 0.85);
}



.reward-badge-row {
    margin-top: 15px;
}

.reward-badge-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
}

.reward-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
}

.reward-badge-name {
    font-size: 16px;
    font-weight: 600;
}

.rewards-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.rewards-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reward-line {
    display: flex;
    flex-direction: column;
}

.reward-label {
    font-size: 14px;
    color: #ccc;
}

.reward-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.rewards-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.reward-badge-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.reward-badge-name {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}



/* ===========================
   BADGE POPUP (Glass Modal)
=========================== */

.badge-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.4s ease-out;
}

.badge-popup-inner {
    padding: 30px 40px;
    text-align: center;
    border-radius: 14px;
    animation: popupScale 0.4s ease-out;
}

.badge-popup-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.badge-popup-icon {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(255,255,255,0.3);
}

.badge-popup-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.badge-popup-close {
    font-size: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    color: #fff;
}

.badge-popup-close:hover {
    opacity: 1;
}

@keyframes popupScale {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}



/* ==========================================
   SECTION 12 — TOUR MAP FIX
========================================== */

#tourMap {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin: 40px auto !important;
    float: none !important;
}
/* ===========================
   TOUR MODALS (SUCCESS / ERROR)
=========================== */

.tour-modal-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.tour-modal-box {
    background: white;
    color: black;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 320px;
}
