/**
 * Coalition Email Validator Styles
 * Styles for email validation and popup modal
 * @package WithCommunity_Zoom_Integration
 * @since 2.3.0
 */

/* Email Field Validation States */
.wczi-validating {
    border-color: #7e8299 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="none" stroke="%237e8299" stroke-width="2"><animate attributeName="stroke-dasharray" dur="1s" repeatCount="indefinite" from="0 50" to="50 0"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px 20px;
}

.wczi-email-error {
    border-color: #f1416c !important;
    background-color: #fff5f8 !important;
}

.wczi-email-success {
    border-color: #50cd89 !important;
    background-color: #f1faff !important;
}

/* Validation Message */
.wczi-validation-message {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.5;
}

.wczi-validation-message.wczi-loading {
    color: #7e8299;
}

.wczi-validation-message.wczi-error {
    color: #f1416c;
}

.wczi-validation-message.wczi-error a {
    color: #d91c4a;
    text-decoration: underline;
}

.wczi-validation-message.wczi-error a:hover {
    color: #b11636;
}

.wczi-validation-message.wczi-success {
    color: #50cd89;
}

/* Popup Overlay */
.wczi-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: wczi-fadeIn 0.3s ease;
}

@keyframes wczi-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Popup Container */
.wczi-popup-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: wczi-slideUp 0.3s ease;
}

@keyframes wczi-slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Popup Header */
.wczi-popup-header {
    background: linear-gradient(135deg, #f1416c 0%, #d91c4a 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.wczi-popup-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.wczi-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Popup Body */
.wczi-popup-body {
    padding: 30px;
}

.wczi-popup-body p {
    margin: 0 0 15px;
    font-size: 16px;
    line-height: 1.6;
    color: #3f4254;
}

.wczi-popup-body p strong {
    color: #181c32;
}

/* Popup Actions */
.wczi-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
}

.wczi-btn {
    display: inline-block;
    padding: 14px 24px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.wczi-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.wczi-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wczi-btn-secondary {
    background: #f3f4f6;
    color: #3f4254;
    border: 1px solid #e1e3ea;
}

.wczi-btn-secondary:hover {
    background: #e1e3ea;
    color: #181c32;
}

.wczi-btn-link {
    background: transparent;
    color: #7e8299;
    padding: 10px;
}

.wczi-btn-link:hover {
    color: #3f4254;
    text-decoration: underline;
}

/* Redirect Notice */
.wczi-redirect-notice {
    background: #f1faff;
    border: 1px solid #c9e7ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.wczi-redirect-notice p {
    margin: 0;
    font-size: 14px;
    color: #3f4254;
}

#wczi-countdown {
    font-weight: 700;
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wczi-popup-container {
        width: 95%;
        margin: 20px;
    }

    .wczi-popup-header {
        padding: 20px;
    }

    .wczi-popup-header h2 {
        font-size: 20px;
    }

    .wczi-popup-icon {
        font-size: 36px;
    }

    .wczi-popup-body {
        padding: 20px;
    }

    .wczi-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Gravity Forms Integration */
.gform_wrapper .wczi-validation-message {
    margin-top: 8px;
}

.gform_wrapper .wczi-email-error {
    border-color: #f1416c !important;
}

.gform_wrapper .wczi-email-success {
    border-color: #50cd89 !important;
}

/* Ultimate Member Integration */
.um-field .wczi-validation-message {
    margin-top: 8px;
}

.um-field input.wczi-email-error {
    border-color: #f1416c !important;
}

.um-field input.wczi-email-success {
    border-color: #50cd89 !important;
}

/* Accessibility */
.wczi-popup-overlay:focus-within .wczi-popup-container {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wczi-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wczi-popup-overlay {
        display: none !important;
    }
}
