/* Overlay Background */
.wscr-modern-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wscr-modern-overlay.wscr-visible {
    opacity: 1;
    visibility: visible;
}

.wscr-modern-overlay.wscr-hidden {
    display: none !important;
}

/* Modal Box */
.wscr-modern-modal {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wscr-modern-overlay.wscr-visible .wscr-modern-modal {
    transform: translateY(0);
}

/* Close Button */
.wscr-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.wscr-close-btn:hover {
    color: #0f172a;
}

/* Typography */
.wscr-modern-modal h2 {
    margin: 0 0 25px 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    line-height: 1.3;
}

/* Inputs */
.wscr-input-group {
    margin-bottom: 16px;
    width: 100%;
}

.wscr-modern-modal input[type="email"],
.wscr-modern-modal input[type="tel"] {
    width: 100%;
    
    /* FIX: Split padding so we do not overwrite the auto-calculated left-padding of intl-tel-input */
    padding-top: 14px;
    padding-bottom: 14px;
    padding-right: 16px;
    
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    color: #334155;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

/* Only the email input needs manual left padding now */
.wscr-modern-modal input[type="email"] {
    padding-left: 16px;
}

.wscr-modern-modal input[type="email"]:focus,
.wscr-modern-modal input[type="tel"]:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    outline: none;
    background: #fff;
}

/* Fix for intl-tel-input width */
.wscr-modern-modal .iti {
    width: 100%;
    display: block;
}

.wscr-modern-modal .iti__flag-container {
    z-index: 5;
}

/* Submit Button */
.wscr-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.wscr-submit-btn:hover {
    background: #1e293b;
}

.wscr-submit-btn:active {
    transform: scale(0.98);
}

.wscr-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Error Message */
.wscr-error {
    margin-top: 15px;
    color: #ef4444;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}