/**
 * Tour Components Styles
 * Modern UI components for single tour pages
 */

/* ============================================
   Tab Navigation
   ============================================ */
.tour-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #EFE9E1;
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.tour-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.tour-tab {
    padding: 1rem 1.75rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #322D29;
    opacity: 0.6;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    min-width: 120px;
    text-align: center;
}

.tour-tab:hover {
    opacity: 0.8;
}

.tour-tab.active {
    opacity: 1;
    border-bottom-color: #72383D;
    color: #72383D;
}

.tour-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tour-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Info Grid (Quick Facts)
   ============================================ */
.tour-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tour-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #EFE9E1 0%, #D1C7BD 100%);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tour-info-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(114, 56, 61, 0.15);
}

.tour-info-icon {
    font-size: 2rem;
    color: #72383D;
    flex-shrink: 0;
}

.tour-info-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #322D29;
    opacity: 0.6;
    font-weight: 600;
}

.tour-info-content p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #322D29;
}

/* ============================================
   List Styles (Highlights, Inclusions)
   ============================================ */
.tour-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tour-list li {
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    line-height: 1.6;
    color: #322D29;
    opacity: 0.85;
}

.tour-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #72383D 0%, #AC9C8D 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.tour-list.not-included li::before {
    content: "✕";
    background: linear-gradient(135deg, #322D29 0%, #AC9C8D 100%);
}

/* ============================================
   Itinerary Stops
   ============================================ */
.tour-itinerary-stops {
    position: relative;
    padding-left: 2rem;
}

.tour-itinerary-stops::before {
    content: "";
    position: absolute;
    left: 0.875rem;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(to bottom, #72383D, #D1C7BD);
}

.tour-stop {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.tour-stop::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: #72383D;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #72383D;
}

.tour-stop h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #322D29;
    font-family: var(--heading-font);
}

.tour-stop p {
    color: #322D29;
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.tour-stop img {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

/* ============================================
   Gallery Grid
   ============================================ */
.tour-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.tour-gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f3f4f6;
    /* Placeholder color while loading */
}

.tour-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.tour-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.tour-gallery-item:hover img {
    transform: scale(1.1);
}

/* ============================================
   Pricing Variations
   ============================================ */
.tour-pricing-table {
    background: #EFE9E1;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tour-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(50, 45, 41, 0.1);
}

.tour-pricing-row:last-child {
    border-bottom: none;
}

.tour-pricing-label {
    font-weight: 500;
    color: #322D29;
}

.tour-pricing-value {
    font-weight: 700;
    color: #72383D;
    font-size: 1.1rem;
}

/* ============================================
   Badge Styles
   ============================================ */
.tour-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #72383D 0%, #AC9C8D 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tour-badge.success {
    background: linear-gradient(135deg, #2d7a3e 0%, #5cb85c 100%);
}

.tour-badge.info {
    background: linear-gradient(135deg, #2c5aa0 0%, #5bc0de 100%);
}

/* ============================================
   Map Container
   ============================================ */
.tour-map-container {
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tour-map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .tour-tabs {
        gap: 0.25rem;
    }

    .tour-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .tour-info-grid {
        grid-template-columns: 1fr;
    }

    .tour-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .tour-info-item {
        padding: 1rem;
    }
}

/* ============================================
   Booking Form Modal
   ============================================ */
.booking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.booking-modal.active {
    display: flex;
}

.booking-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-modal-header {
    background: linear-gradient(135deg, #72383D 0%, #AC9C8D 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.booking-modal-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-family: var(--heading-font);
}

.booking-modal-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.booking-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.2s ease;
}

.booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.booking-modal-body {
    padding: 2rem;
}

.booking-form-group {
    margin-bottom: 1.5rem;
}

.booking-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #322D29;
    font-size: 0.95rem;
}

.booking-form-group label .required {
    color: #72383D;
    margin-left: 2px;
}

.booking-form-group input,
.booking-form-group select,
.booking-form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #EFE9E1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-form-group input:focus,
.booking-form-group select:focus,
.booking-form-group textarea:focus {
    outline: none;
    border-color: #72383D;
    box-shadow: 0 0 0 3px rgba(114, 56, 61, 0.1);
}

.booking-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.booking-form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #72383D 0%, #AC9C8D 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.booking-form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(114, 56, 61, 0.3);
}

.booking-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.booking-form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.booking-form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.booking-form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.booking-price-summary {
    background: #EFE9E1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.booking-price-summary h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #322D29;
}

.booking-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #322D29;
    opacity: 0.8;
}

.booking-price-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #D1C7BD;
    font-weight: 700;
    font-size: 1.25rem;
    color: #72383D;
}

@media (max-width: 640px) {
    .booking-form-row {
        grid-template-columns: 1fr;
    }

    .booking-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .booking-modal-header,
    .booking-modal-body {
        padding: 1.5rem;
    }
}

/* ============================================
   Flowbite Datepicker Overrides
   ============================================ */
/* ============================================
   Gallery Lightbox
   ============================================ */
.tour-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tour-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.tour-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.tour-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tour-lightbox-close:hover {
    transform: scale(1.1);
}

.tour-lightbox-prev,
.tour-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.tour-lightbox-prev:hover,
.tour-lightbox-next:hover {
    background: white;
    color: black;
    transform: translateY(-50%) scale(1.1);
}

.tour-lightbox-prev {
    left: -70px;
}

.tour-lightbox-next {
    right: -70px;
}

@media (max-width: 1024px) {
    .tour-lightbox-prev {
        left: 10px;
    }

    .tour-lightbox-next {
        right: 10px;
    }

    .tour-lightbox-prev,
    .tour-lightbox-next {
        background: rgba(0, 0, 0, 0.5);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}