/**
 * CF7 Email Verification Styles
 * Professional modal styling matching the booking calendar system
 */

/* ========== Modal Container ========== */
.cf7ev-verify-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    animation: cf7ev-fadeIn 0.2s ease;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

@keyframes cf7ev-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== Overlay (Blur Background) ========== */
.cf7ev-verify-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}

/* ========== Content Card ========== */
.cf7ev-verify-content {
    position: relative;
    max-width: 480px;
    margin: 120px auto 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cf7ev-slideDown 0.3s ease;
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    z-index: 2;
}

@keyframes cf7ev-slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Header ========== */
.cf7ev-verify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.cf7ev-verify-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.cf7ev-verify-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
}

.cf7ev-verify-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* ========== Body ========== */
.cf7ev-verify-body {
    padding: 28px;
}

.cf7ev-verify-message {
    font-size: 15px;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.cf7ev-verify-message strong {
    color: var(--cf7ev-accent-color, #2536eb);
    font-weight: 600;
}

.cf7ev-verify-submessage {
    font-size: 13px;
    color: #888;
    margin: 0 0 24px 0;
}

/* ========== Code Input ========== */
.cf7ev-verify-code-input-group {
    margin-bottom: 20px;
}

.cf7ev-verify-code-input {
    width: 100% !important;
    display: block !important;
    background: #f9fafb !important;
    background-color: #f9fafb !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    text-align: center !important;
    letter-spacing: 8px !important;
    font-family: 'DM Sans', 'Courier New', monospace !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.2s !important;
}

.cf7ev-verify-code-input:focus {
    border-color: var(--cf7ev-accent-color, #2536eb) !important;
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(37, 54, 235, 0.1) !important;
}

.cf7ev-verify-code-input::placeholder {
    color: #d1d5db !important;
    letter-spacing: 8px !important;
    opacity: 1 !important;
}

.cf7ev-verify-code-input:-webkit-autofill,
.cf7ev-verify-code-input:-webkit-autofill:hover,
.cf7ev-verify-code-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1a1a1a !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    transition: background-color 99999s ease-in-out 0s !important;
}

/* ========== Error Message ========== */
.cf7ev-verify-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid #dc2626;
    display: none;
}

.cf7ev-verify-error:not(:empty) {
    display: block;
}

/* ========== Submit Button ========== */
.cf7ev-verify-submit-btn {
    width: 100%;
    background: var(--cf7ev-accent-color, #2536eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.cf7ev-verify-submit-btn:hover:not(:disabled) {
    filter: brightness(0.9);
}

.cf7ev-verify-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========== Resend Link ========== */
.cf7ev-verify-resend {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

.cf7ev-verify-resend-btn {
    background: none;
    border: none;
    color: var(--cf7ev-accent-color, #2536eb);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
    font-size: inherit;
}

.cf7ev-verify-resend-btn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
}

/* ========== Change Email Link ========== */
.cf7ev-verify-change-email-link {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.cf7ev-verify-change-email-btn {
    background: none;
    border: none;
    color: var(--cf7ev-accent-color, #2536eb);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
    font-size: inherit;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 640px) {
    .cf7ev-verify-content {
        margin: 80px 20px 20px 20px;
        border-radius: 12px;
        max-width: calc(100% - 40px);
    }

    .cf7ev-verify-header {
        padding: 20px;
    }

    .cf7ev-verify-header h3 {
        font-size: 18px;
    }

    .cf7ev-verify-body {
        padding: 20px;
    }

    .cf7ev-verify-code-input {
        font-size: 24px !important;
        letter-spacing: 6px !important;
        padding: 14px 16px !important;
    }
}

/* ========== Prevent Body Scroll ========== */
body.cf7ev-modal-open {
    overflow: hidden !important;
}

/* ========== Print Styles ========== */
@media print {
    .cf7ev-verify-modal {
        display: none !important;
    }
}
