/* Global Styles */
/* Removed body styles to prevent conflicts with WordPress theme */

/* Enforce Black/White Aesthetic to override Theme Defaults */
#popupOverlay .popup-container a {
    color: #333;
    text-decoration: none;
}

#popupOverlay .popup-container a:hover {
    color: #000;
}

#popupOverlay .popup-container ::selection {
    background: #000;
    color: #fff;
}

/* Checkbox Accent */
#popupOverlay .popup-container input[type="checkbox"] {
    accent-color: #000;
}

/* Modal Overlay */
#popupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    /* Hidden by default, JS handles 2s delay */
    justify-content: center;
    align-items: center;
    z-index: 999999;
    /* High z-index but trying not to break everything */
}

/* Modal Container */
#popupOverlay .popup-container {
    background-color: #fff;
    width: 90%;
    max-width: 320px;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* Ensure pseudo-element doesn't overflow */
    z-index: 1;
    /* Establish stacking context */
    font-family: 'Montserrat', sans-serif !important;
    /* Force font only inside */
}

/* Background Pattern with Opacity */
#popupOverlay .popup-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/img/pattern.png');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    /* 5% Opacity */
    z-index: -1;
    /* Behind content */
}

/* Close Button */
#popupOverlay .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000 !important;
    /* Force Black */
    font-weight: bold;
    z-index: 2;
}

/* Logo */
#popupOverlay .logo-area {
    margin-bottom: 20px;
}

#popupOverlay .logo-img {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Typography */
#popupOverlay .sub-headline {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    /* Force Black */
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .main-headline {
    font-size: 48px;
    font-weight: 900;
    color: #000;
    margin: 5px 0;
    line-height: 1;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .sub-headline-bottom {
    font-size: 14px;
    font-weight: 400;
    color: #555;
    margin: 0 0 25px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif !important;
}

/* Form */
#popupOverlay #discountForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#popupOverlay input[type="email"] {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif !important;
    outline: none;
    color: #000;
    width: 100%;
    /* Ensure it fits */
    box-sizing: border-box;
    /* Fix padding issues */
    background: #fff !important;
}

#popupOverlay input[type="email"]:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
    /* Sharp black focus */
}

#popupOverlay .checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
}

#popupOverlay .checkbox-container input {
    margin-top: 2px;
}

/* Buttons */
#popupOverlay .cta-btn {
    background-color: #000 !important;
    /* Force Black */
    color: #fff !important;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    width: 100%;
}

#popupOverlay .cta-btn:hover {
    background-color: #222 !important;
    transform: scale(1.02);
}

#popupOverlay .cta-btn:disabled {
    background-color: #555 !important;
    cursor: not-allowed;
    transform: none;
}

#popupOverlay .decline-link {
    display: block;
    margin-top: 15px;
    color: #666 !important;
    font-size: 12px;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .decline-link:hover {
    color: #000 !important;
}

/* Message Area */
#popupOverlay .message-area {
    margin-top: 20px;
    font-weight: bold;
    font-size: 14px;
    min-height: 20px;
}

#popupOverlay .error-msg {
    color: #000 !important;
    /* Replaced Red with Black/Dark per request */
    border: 1px solid #000;
    padding: 5px;
    display: inline-block;
}

#popupOverlay .success-msg {
    color: #000 !important;
    /* Force black for consistency */
}

/* Success Content Styles */
#popupOverlay .success-content {
    margin-top: 20px;
    animation: pp_fadeIn 0.5s ease-out;
    /* Renamed to prevent conflict */
}

#popupOverlay .success-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
    color: #000;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .success-text {
    font-size: 14px;
    margin-bottom: 20px;
    color: #000;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .coupon-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f4f4f4;
    border: 2px dashed #000;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

#popupOverlay #couponCode {
    font-size: 20px;
    font-weight: 900;
    color: #000;
    letter-spacing: 1px;
    color: #000;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .copy-btn {
    background: #000 !important;
    color: #fff !important;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Montserrat', sans-serif !important;
}

#popupOverlay .copy-btn:hover {
    background-color: #333 !important;
}

#popupOverlay .success-note {
    font-size: 12px;
    color: #888;
    font-family: 'Montserrat', sans-serif !important;
}

@keyframes pp_fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}