/*
 * Flight Search Animation Modal - Robust & Clean Design v3
 */

/* Overlay */
.flight-search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 50, 101, 0.92); /* Slightly adjusted opacity */
    z-index: 999999;
    display: none; /* Controlled by JS to trigger transitions */
    padding: 0; /* Avoid shifting the true viewport center */
    box-sizing: border-box;

    /* Transition for a smooth fade-in */
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.flight-search-modal-overlay.show {
    display: block;
    opacity: 1;
}

/* Content Box */
.flight-search-modal-content {
    position: fixed; /* Center relative to the viewport, not the overlay box */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: white;
    border-radius: 18px; /* Softer radius */
    padding: 20px 22px;
    text-align: center;
    max-width: 380px; /* Compact width */
    width: min(92vw, 380px); /* Responsive compact width for all devices */
    max-height: 90vh; /* Ensure fully visible on short viewports */
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    gap: 15px;

    /* Smooth scale-up animation for the content box */
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease-out;
    transition-delay: 0.05s; /* Stagger the content animation slightly */
}

.flight-search-modal-overlay.show .flight-search-modal-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Company Logo */
.company-logo-section img {
    height: 42px; /* Refined size */
    width: auto;
}

/* Search Status Text */
.search-status {
    margin-top: 5px;
}
.search-status h2 {
    color: #003265;
    font-size: 19px;
    margin: 0 0 5px 0;
    font-weight: 700;
}
.search-status p {
    color: #555;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Sky Animation */
.sky-animation {
    height: 75px;
    background: linear-gradient(135deg, #a0d8f0 0%, #dceef7 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.cloud-1, .cloud-2, .cloud-3 {
    position: absolute;
    font-size: 20px;
    animation: float-cloud 5s ease-in-out infinite;
    opacity: 0.8;
}
.cloud-1 { top: 25%; left: 15%; animation-duration: 6s; }
.cloud-2 { top: 55%; right: 20%; animation-duration: 4s; animation-delay: 1s; }
.cloud-3 { top: 35%; left: 50%; font-size: 16px; animation-duration: 7s; animation-delay: 0.5s; }

.flying-airplane {
    position: absolute;
    top: 50%;
    left: 0; /* Start from left */
    font-size: 28px;
    animation: fly-airplane 3s ease-in-out infinite;
    animation-delay: 0.2s;
}

/* Loading Dots */
.loading-animation {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: -5px; /* Pull up slightly */
    margin-bottom: 5px;
}
.dot-1, .dot-2, .dot-3 {
    width: 8px;
    height: 8px;
    background: #FCAE1E;
    border-radius: 50%;
    animation: bounce-dot 1.4s ease-in-out infinite both;
}
.dot-2 { animation-delay: 0.16s; }
.dot-3 { animation-delay: 0.32s; }

/* Contact Section */
.contact-section {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9eef3;
}
.contact-section strong {
    color: #003265;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.contact-section a {
    color: #003265;
    text-decoration: none;
    font-size: 19px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}
.contact-section small {
    color: #e09710;
    font-weight: 600;
    font-size: 12px;
}

/* Keyframes */
@keyframes float-cloud {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-8px) translateX(5px); }
}

@keyframes fly-airplane {
    0% { transform: translate(-50px, -50%); } /* Start off-screen left */
    100% { transform: translate(400px, -50%); } /* End off-screen right */
}

@keyframes bounce-dot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
