/**
 * Detail Page Enhancements
 * Fixes for Activity and Room Detail Pages
 */

/* ========================================
   1. STICKY SIDEBAR ENHANCEMENTS
   ======================================== */

/* Improved sticky sidebar with better positioning */
.tg-tour-about-sidebar.top-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Ensure sidebar stays visible on scroll */
@media (min-width: 992px) {
    .tg-tour-about-sidebar.top-sticky {
        position: sticky;
        top: 100px;
    }
}

/* Mobile: Remove sticky behavior for sidebar */
@media (max-width: 991px) {
    .tg-tour-about-sidebar.top-sticky {
        position: relative;
        top: 0;
    }
}

/* ========================================
   STICKY BOTTOM BOOKING BAR
   Always-visible price and booking CTA
   Mobile only - hidden on desktop
   ======================================== */

.sticky-booking-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-top: 2px solid #b38f4b;
    padding: 16px 20px;
    box-shadow: 0 -8px 30px rgba(179, 143, 75, 0.15);
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    /* Hidden by default on desktop */
}

.sticky-booking-bar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
}

/* Show only on mobile devices (tablets and below) */
@media (max-width: 991px) {
    .sticky-booking-bar {
        display: block;
    }
}

.sticky-booking-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Left side: Price section */
.sticky-booking-bar .sticky-price-section {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 0 0 auto;
}

.sticky-booking-bar .sticky-price-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sticky-booking-bar .sticky-price-amount {
    font-size: 22px;
    color: #b38f4b;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Right side: Book Now button */
.sticky-booking-bar .sticky-book-btn {
    /* use the primary black button styling for consistency */
    background: #000000;
    color: #ffffff !important;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    flex: 0 0 auto;
    white-space: nowrap;
}

.sticky-booking-bar .sticky-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    background: #1a1a1a;
}

.sticky-booking-bar .sticky-book-btn:active {
    transform: translateY(0);
}

.sticky-booking-bar .sticky-book-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sticky-booking-bar {
        padding: 14px 15px;
    }

    .sticky-booking-bar .container {
        gap: 15px;
        padding: 0 10px;
    }

    .sticky-booking-bar .sticky-price-label {
        font-size: 11px;
    }

    .sticky-booking-bar .sticky-price-amount {
        font-size: 20px;
    }

    .sticky-booking-bar .sticky-book-btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sticky-booking-bar .sticky-price-amount {
        font-size: 18px;
    }

    .sticky-booking-bar .sticky-book-btn {
        padding: 11px 24px;
        font-size: 13px;
        gap: 8px;
    }

    .sticky-booking-bar .sticky-book-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* RTL Support */
[dir="rtl"] .sticky-booking-bar .container {
    flex-direction: row-reverse;
}

[dir="rtl"] .sticky-booking-bar .sticky-book-btn {
    flex-direction: row-reverse;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sticky-booking-bar {
        border-top-width: 3px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
}

/* ========================================
   2. PAGE TITLE SIZE FIX
   ======================================== */

/* Reduce the oversized title */
.tg-tour-details-video-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

@media (max-width: 768px) {
    .tg-tour-details-video-title {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 480px) {
    .tg-tour-details-video-title {
        font-size: 18px !important;
    }
}

/* ========================================
   3. CANCELLATION MESSAGE SIZE FIX
   ======================================== */

/* Increase cancellation message font size */
.tg-tour-about-sidebar .text-muted {
    font-size: 13px !important;
    line-height: 1.5;
    color: #666 !important;
    margin-bottom: 5px;
}

/* Support phone section styling */
.tg-tour-about-sidebar>div[style*="font-size: 12px"] {
    font-size: 14px !important;
    color: #333;
    margin-top: 15px;
}

.tg-tour-about-sidebar a[href^="tel:"] {
    color: #b38f4b;
    font-weight: 500;
    text-decoration: none;
}

.tg-tour-about-sidebar a[href^="tel:"]:hover {
    color: #8b6f3b;
}

/* ========================================
   4. MAP STYLING FIX
   ======================================== */

/* Fix dark/black map issue */
.tg-tour-about-map iframe {
    width: 100% !important;
    height: 450px !important;
    border-radius: 8px;
    filter: none !important;
    -webkit-filter: none !important;
    /* Ensure map renders properly */
    background-color: #f5f5f5;
}

/* Map container styling */
.tg-tour-about-map {
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* Force normal map colors */
.tg-tour-about-map iframe {
    filter: brightness(1) contrast(1) !important;
    -webkit-filter: brightness(1) contrast(1) !important;
}

/* Override any dark mode filters */
iframe[src*="google.com/maps"] {
    filter: none !important;
    -webkit-filter: none !important;
    background: white !important;
}

/* ========================================
   5. PRICE AND BOOKING SECTION
   ======================================== */

/* Enhanced price display */
.tg-tour-about-coast .total-price {
    font-size: 28px;
    font-weight: 700;
    color: #b38f4b;
    margin: 0;
}

.tg-tour-about-sidebar-title {
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

/* Book Now button enhancement */
.tg-tour-about-sidebar .tg-btn {
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* ========================================
   6. SIDEBAR CARD STYLING
   ======================================== */

/* Better sidebar card appearance */
.tg-tour-about-sidebar {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tg-tour-about-sidebar .tg-tour-about-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Border styling */
.tg-tour-about-border-doted {
    border-top: 1px dashed #d0d0d0;
    margin: 15px 0;
}

/* ========================================
   7. RTL SUPPORT
   ======================================== */

[dir="rtl"] .tg-tour-about-sidebar {
    text-align: right;
}

[dir="rtl"] .tg-tour-about-coast {
    flex-direction: row-reverse;
}

[dir="rtl"] .tg-tour-about-sidebar a[href^="tel:"] i {
    margin-left: 5px;
    margin-right: 0;
}

/* ========================================
   8. MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 991px) {

    /* Sidebar full width on mobile */
    .tg-tour-about-sidebar {
        margin-top: 30px;
    }

    /* Adjust prices on mobile */
    .tg-tour-about-coast .total-price {
        font-size: 24px;
    }

    /* Map responsive height */
    .tg-tour-about-map iframe {
        height: 350px !important;
    }
}

@media (max-width: 767px) {
    .tg-tour-about-sidebar {
        padding: 20px;
    }

    .tg-tour-about-map iframe {
        height: 300px !important;
    }
}

/* ========================================
   9. ADDITIONAL IMPROVEMENTS
   ======================================== */

/* Smooth scrolling for sticky elements */
html {
    scroll-behavior: smooth;
}

/* Better spacing for price section */
.tg-tour-details-video-feature-price {
    font-size: 18px;
    font-weight: 500;
}

.tg-tour-details-video-feature-price span {
    font-size: 24px;
    font-weight: 700;
    color: #b38f4b;
    margin-left: 5px;
}

[dir="rtl"] .tg-tour-details-video-feature-price span {
    margin-left: 0;
    margin-right: 5px;
}

/* ========================================
   10. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Better focus states */
.tg-tour-about-sidebar .tg-btn:focus {
    outline: 2px solid #b38f4b;
    outline-offset: 2px;
}

.tg-tour-about-sidebar a:focus {
    outline: 2px solid #b38f4b;
    outline-offset: 2px;
}

/* High contrast for better readability */
.tg-tour-about-sidebar .text-muted {
    opacity: 0.9;
}

/* ========================================
   11. LOADING STATES
   ======================================== */

/* Map loading state */
.tg-tour-about-map iframe {
    min-height: 450px;
}

.tg-tour-about-map iframe::before {
    content: 'Loading map...';
    display: block;
    text-align: center;
    padding: 50px;
    color: #999;
}

/* ========================================
   12. PRINT STYLES
   ======================================== */

@media print {
    .tg-tour-about-sidebar.top-sticky {
        position: relative;
        top: 0;
    }

    .tg-tour-about-map iframe {
        height: 400px !important;
    }
}