/* FluentForms Enhancer Styles */

/* Modal Styles */
.ff-enhancer-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: ff-enhancer-fadeIn 0.3s;
}

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

.ff-enhancer-modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 450px;
    animation: ff-enhancer-slideIn 0.3s;
    position: relative;
    overflow: hidden;
}

@keyframes ff-enhancer-slideIn {
    from { 
        transform: translateY(-30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.ff-enhancer-modal-header {
    background-color: transparent;
    padding: 16px 16px 0 16px;
    border-bottom: none;
    position: relative;
}

.ff-enhancer-close {
    color: #9CA3AF;
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.ff-enhancer-close:hover,
.ff-enhancer-close:focus {
    color: #4B5563;
}

.ff-enhancer-modal-body {
    padding: 0 32px 32px 32px;
    text-align: center;
}

.ff-enhancer-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.ff-enhancer-modal-title {
    margin: 0 0 16px 0;
    color: #bf4a92;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.ff-enhancer-modal-body h2 {
    margin: 0 0 16px 0;
    color: #bf4a92;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.ff-enhancer-modal-body p {
    margin: 0 0 16px 0;
    color: #6B7280;
    line-height: 1.5;
    font-size: 14px;
}

.ff-enhancer-modal-body p:last-of-type {
    margin-bottom: 32px;
}

.ff-enhancer-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.ff-enhancer-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    max-width: 280px;
    font-family: inherit;
}

.ff-enhancer-button-primary {
    background-color: #bf4a92;
    color: #ffffff;
}

.ff-enhancer-button-primary:hover {
    background-color: #602276;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(191, 74, 146, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.ff-enhancer-button-secondary {
    background-color: #6B7280;
    color: #ffffff;
}

.ff-enhancer-button-secondary:hover {
    background-color: #4B5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.ff-enhancer-button:focus {
    outline: 2px solid #bf4a92;
    outline-offset: 2px;
}

.ff-enhancer-button:active {
    transform: translateY(0);
}

/* Phone Validation Error Styles */
.ff-enhancer-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.ff-enhancer-phone-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    display: block;
}

/* Responsive Design */
@media (max-width: 600px) {
    .ff-enhancer-modal-content {
        margin: 10% auto;
        width: 95%;
        max-width: 350px;
    }
    
    .ff-enhancer-modal-body {
        padding: 0 24px 24px 24px;
    }
    
    .ff-enhancer-modal-title,
    .ff-enhancer-modal-body h2 {
        font-size: 18px;
    }
    
    .ff-enhancer-modal-body p {
        font-size: 13px;
    }
    
    .ff-enhancer-button {
        max-width: none;
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ff-enhancer-modal-content {
        background-color: #1F2937;
        color: #F9FAFB;
    }
    
    .ff-enhancer-modal-title,
    .ff-enhancer-modal-body h2 {
        color: #bf4a92;
    }
    
    .ff-enhancer-modal-body p {
        color: #D1D5DB;
    }
    
    .ff-enhancer-close {
        color: #9CA3AF;
    }
    
    .ff-enhancer-close:hover {
        color: #F3F4F6;
    }
    
    .ff-enhancer-phone-error {
        background-color: #742a2a;
        border-color: #9b2c2c;
        color: #feb2b2;
    }
}

/* Integration with FluentForms styles */
.fluentform .ff-enhancer-modal {
    font-family: inherit;
}

.fluentform .ff-enhancer-button {
    font-family: inherit;
}

/* Loading states */
.ff-enhancer-checking {
    position: relative;
}

.ff-enhancer-checking::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #bf4a92;
    border-radius: 50%;
    animation: ff-enhancer-spin 1s linear infinite;
}

@keyframes ff-enhancer-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Success/Error indicators for email fields */
.ff-enhancer-email-success {
    border-color: #bf4a92 !important;
    box-shadow: 0 0 0 0.2rem rgba(191, 74, 146, 0.25) !important;
}

.ff-enhancer-email-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.ff-enhancer-email-checking {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}