/* Overlay to cover the whole screen */
#downloadPopup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex; /* Flexbox for perfect centering */
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* The dark background behind the modal */
.popupOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Darker dim */
    backdrop-filter: blur(2px); /* Slight blur for modern feel */
}

/* The main modal container */
.popupBox {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 53.75rem;
    padding: 3rem 4rem 2.75rem 4rem; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 10;
    text-align: left;
}

/* Close Button (Top Right) */
.closePopup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.closePopup:hover {
    color: #111;
}

/* Header Text */
.popupHeader {
    margin-bottom: 24px;
}

.popupHeader h3 {
    margin: 0 0 8px 0;
    font-size: 1.875vw;
    font-family: "Newscience-Semibold";
    color: #092f50;
    line-height: 1.3em;
}
.popupHeader p {
    margin: 0;
    font-size: 1.0417vw;;
    font-family: "Newscience-Regular";
    color: #6b7280;
}

/* Input Fields Wrapper */
.popupBody {
    display: flex;
    align-items: flex-start; /* Aligns items to top so error msg doesn't break alignment */
    flex-wrap: wrap;
}
.inputGroup {
    margin: 0 12px 12px 0;
    flex: 0 0 calc(50% - 12px);
    position: relative; /* For error positioning */
}
.inputGroup.emailInpt { 
    flex: 0 0 calc(50% - 12px);
}
.inputGroup.PhoneInpt { 
    flex: 0 0 calc(100% - 12px);
}

/* INPUT STYLES */
.popupBox input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 14px;
    font-family: "Inter-Regular";
    outline: none;
    box-sizing: border-box;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.popupBox input::placeholder {
    color: #9ca3af;
}

.popupBox input:focus {
    border-color: #092f50;
    box-shadow: none
}

/* VALIDATION STYLES */
.popupBox input.input-error {
    border: 1px solid #dc3545 !important; /* Red Border */
    background-color: #fff8f8;
}

.error-msg {
    color: #dc3545; /* Red Text */
    font-size: 12px;
    margin-top: 4px;
    display: block;
    text-align: left;
    font-weight: 500;
}

/* Download Button */
#dl_submit {
    margin-top: 8px;
    background: #092f50;
    color: #fff;
    padding: 10px 24px;
    border-radius: 101px;
    font-size: 16px;
    font-family: "Inter-Regular";
    cursor: pointer;
    width: max-content;
    display: block;
    border: 1px solid #092f50;
    transition: 0.3s ease;
}
#dl_submit i {
    transform: rotate(-45deg);
    margin-left: 10px;
}
#dl_submit:hover {
    background: #FFFFFF; 
    color: #092f50;
}

/* Responsive */
@media screen and (max-width: 767px) {
    .popupHeader h3 { 
        font-size: 20px; 
    } 
    .popupHeader p { 
        font-size: 14px; 
    }
    .popupBox { 
        width: 90%; 
        padding: 3rem 4rem 2.75rem 4rem; 
    }
}
@media screen and (max-width: 576px) {
    .inputGroup, .inputGroup.emailInpt, .inputGroup.PhoneInpt {
        flex: 0 0 100%;
    } 
    .popupBox { 
        padding: 3rem 2rem 2.75rem 2rem;
    }
    #dl_submit { 
        width: 100%; 
    }
    .popupHeader p {
        font-size: 12px;
    }
}