/* Video Popup Modal - 24-Hour Website Delivery */

/* BASE STYLES for video popup button */
.video-popup-btn {
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    color: #00205B;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-popup-btn:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* MOBILE: Fixed floating button (default - shows on mobile) */
#videoPopupBtn {
    position: fixed !important;
    top: 100px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
    padding: 8px 16px !important;
    border-radius: 50px;
    font-size: 0.85rem !important;
    justify-content: center;
    width: calc(100% - 30px) !important;
    max-width: 300px !important;
}

#videoPopupBtn:hover {
    transform: translateX(-50%) translateY(-2px) !important;
}

/* DESKTOP: Inline button in header CTA bar - now uses cta-btn cta-video class */
#videoPopupBtnDesktop {
    display: none; /* Hidden by default on mobile, shown on desktop via media query */
    white-space: nowrap;
}

/* DESKTOP ONLY (≥1189px): Show inline button, hide fixed button */
@media screen and (min-width: 1189px) {
    #videoPopupBtn {
        display: none !important;
    }
    #videoPopupBtnDesktop {
        display: inline-flex !important;
    }
}

/* TICKER MARGIN RULES REMOVED - Now consolidated in page-template.php */
/* Prevents cascade conflicts between external and inline CSS */

/* Video Modal Overlay */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.video-modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.video-modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: #1a1a1a;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: visible;
    z-index: 1;
}

.video-modal-overlay.active .video-modal-content {
    transform: scale(1);
}

/* Close Button - DEFAULT DESKTOP */
.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    color: #FFFFFF;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    font-size: 36px;
    font-weight: 700;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
    z-index: 999999;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.video-modal-close:hover {
    background: #FF0000;
    color: #FFFFFF;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.6);
}

/* Close Button - MOBILE VIEW ONLY */
@media screen and (max-width: 480px) {
    .video-modal-close {
        top: 60px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        font-size: 30px;
    }

    .video-modal-close:hover {
        transform: translateX(-50%) scale(1.1) rotate(90deg);
    }
}

/* Video Container */
.video-modal-video {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    z-index: 1;
    min-height: 300px;
}

.video-modal-video video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Modal Title */
.video-modal-title {
    color: #F4D03F;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

@media screen and (max-width: 480px) {
    .video-modal-title {
        font-size: 1.1rem;
    }
}

/* Modal Links */
.video-modal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-modal-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.video-modal-link.primary {
    background: linear-gradient(135deg, #00205B, #8B7FB8);
    color: white;
}

.video-modal-link.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 32, 91, 0.4);
}

.video-modal-link.secondary {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    border: 2px solid #D4AF37;
}

.video-modal-link.secondary:hover {
    background: rgba(212, 175, 55, 0.2);
}

@media screen and (max-width: 480px) {
    .video-modal-overlay {
        padding: 10px;
    }

    .video-modal-content {
        max-width: 100%;
        padding: 15px;
    }
}

/* Prevent body scroll when modal is open */
body.video-modal-open {
    overflow: hidden;
}

/* TICKER MARGIN RULES REMOVED - Now consolidated in page-template.php */

/* Change hamburger button to ROW layout */
.mobile-menu-toggle {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Hamburger icon wrapper - keeps 3 lines stacked vertically */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    width: 24px;
    height: 18px;
}

/* Position hamburger lines for proper X animation */
.hamburger-icon span {
    position: absolute !important;
    width: 100% !important;
}

.hamburger-icon span:nth-child(1) {
    top: 0 !important;
}

.hamburger-icon span:nth-child(2) {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.hamburger-icon span:nth-child(3) {
    bottom: 0 !important;
}

/* MENU text to the RIGHT of hamburger using ::after */
.mobile-menu-toggle::after {
    content: "MENU";
    font-size: 0.85rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Fix X animation when menu is open - lines cross in center */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    top: 9px !important;
    bottom: auto !important;
    transform: rotate(45deg) !important;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0 !important;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    top: 9px !important;
    bottom: auto !important;
    transform: rotate(-45deg) !important;
}
