/* ===============================
   BOOTSTRAP MODAL OVERRIDES
================================= */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    display: flex;
    align-items: flex-start;     /* ⬅️ allow downward movement */
    justify-content: center;
    min-height: 100vh;
    margin: 0 auto;
    padding: 15px;
    padding-top: 120px;  
    width: -webkit-fill-available;/* ⬅️ moves modal DOWN */
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    border: none;
    width: 100%;
    max-width: 560px;            /* ⬅️ slightly wider */
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35);
    animation: slideIn 0.4s ease-out;
    
}

/* ===============================
   ANIMATIONS
================================= */

@keyframes slideIn {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===============================
   POPUP CONTAINER
================================= */

.popup-container {
    padding: 35px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* ===============================
   CLOSE BUTTON
================================= */

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f3f3f3;
    border: none;
    font-size: 20px;
    color: #555;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display:none;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


.close-btn:hover {
    background: #e6e6e6;
    color: #222;
}

/* ===============================
   ICON
================================= */

.popup-icon {
    width: 60px;
    height: 60px;
    background: #FFC107;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

/* ===============================
   TEXT
================================= */

.popup-heading {
    color: #003366;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-subheading {
    color: #666;
    font-size: 14px;
    margin-bottom: 22px;
}

/* ===============================
   FORM
================================= */

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    width: 100%;
}

.phone-input {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.phone-input:focus {
    border-color: #FFC107;
}

.submit-btn {
    background: #003366;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #002244;
}

.submit-btn:active {
    transform: scale(0.97);
}

/* ===============================
   SUCCESS MESSAGE
================================= */

.success-message {
    display: none;
    color: #2e7d32;
    font-size: 15px;
    margin-top: 15px;
    padding: 10px;
    background: #eaf7ea;
    border-radius: 8px;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}


/* ===============================
   TABLET & SMALL DEVICES
================================= */
@media (max-width: 768px) {
    .modal-dialog {
        padding-top: 90px;      /* keep popup slightly down */
    }

    .popup-container {
        padding: 28px 20px;
    }

    .popup-heading {
        font-size: 22px;
    }

    .popup-subheading {
        font-size: 14px;
    }
}

/* ===============================
   MOBILE DEVICES
================================= */
@media (max-width: 480px) {
    .modal-dialog {
        padding: 10px;
        padding-top: 70px;      /* ⬅️ lower popup on mobile */
    }

    .modal-content {
        max-width: 95%;         /* full-width feel */
        border-radius: 14px;
    }

    .popup-container {
        padding: 24px 16px;
    }

    .popup-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .popup-heading {
        font-size: 19px;
        line-height: 1.3;
    }

    .popup-subheading {
        font-size: 13px;
        line-height: 1.4;
    }

    .phone-input {
        font-size: 16px;        /* Prevent iOS zoom */
        padding: 12px 14px;
    }

    .submit-btn {
        font-size: 15px;
        padding: 12px;
    }

    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}
