/**
 * Elementor Forms Manager Pro - Frontend Animations
 * Only animations - no overrides to Elementor default styles
 */

/* ===========================================
   FORM ENTRANCE ANIMATIONS
   =========================================== */

/* Fade In */
.efmpro-anim-fade-in .elementor-form {
    animation: efmproFadeIn 0.5s ease-out forwards;
}

@keyframes efmproFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Up */
.efmpro-anim-slide-up .elementor-form {
    animation: efmproSlideUp 0.5s ease-out forwards;
}

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

/* Zoom In */
.efmpro-anim-zoom-in .elementor-form {
    animation: efmproZoomIn 0.4s ease-out forwards;
}

@keyframes efmproZoomIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* ===========================================
   BUTTON HOVER EFFECTS
   =========================================== */

/* Grow */
.efmpro-btn-grow .elementor-button {
    transition: transform 0.3s ease;
}
.efmpro-btn-grow .elementor-button:hover {
    transform: scale(1.05);
}

/* Shrink */
.efmpro-btn-shrink .elementor-button {
    transition: transform 0.3s ease;
}
.efmpro-btn-shrink .elementor-button:hover {
    transform: scale(0.95);
}

/* Pulse */
.efmpro-btn-pulse .elementor-button:hover {
    animation: efmproPulse 1s ease-in-out infinite;
}

@keyframes efmproPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Float */
.efmpro-btn-float .elementor-button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.efmpro-btn-float .elementor-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   ACCESSIBILITY - Reduced Motion
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    .efmpro-anim-fade-in .elementor-form,
    .efmpro-anim-slide-up .elementor-form,
    .efmpro-anim-zoom-in .elementor-form {
        animation: none;
    }
    
    .efmpro-btn-grow .elementor-button:hover,
    .efmpro-btn-shrink .elementor-button:hover,
    .efmpro-btn-float .elementor-button:hover {
        transform: none;
    }
    
    .efmpro-btn-pulse .elementor-button:hover {
        animation: none;
    }
}

/* ===========================================
   SELECT DROPDOWN OPTION STYLING SUPPORT
   Browser support varies - works best in Firefox
   =========================================== */

/* Ensure select options can receive styling */
.elementor-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Firefox specific - better option styling support */
@-moz-document url-prefix() {
    .elementor-form select option {
        padding: 8px 12px;
    }
    
    .elementor-form select option:checked,
    .elementor-form select option:hover {
        box-shadow: 0 0 10px 100px currentColor inset;
    }
}

/* ===========================================
   CUSTOM FILE UPLOAD STYLING
   =========================================== */

/* Container for customized upload */
.efmpro-upload-customized {
    position: relative;
}

/* Hide original input when customized - but keep accessible */
.efmpro-upload-customized input[type="file"].efmpro-upload-input-hidden {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: -1 !important;
}

/* Custom upload wrapper */
.efmpro-upload-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%;
}

.efmpro-upload-wrapper:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.efmpro-upload-wrapper.drag-over {
    border-color: #6366f1;
    background: #eef2ff;
    border-style: solid;
}

/* Custom upload button */
.efmpro-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #6366f1;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.efmpro-upload-btn:hover {
    background: #4f46e5;
}

.efmpro-upload-btn:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* File name display */
.efmpro-upload-filename {
    color: #6b7280;
    font-size: 14px;
}

.efmpro-upload-filename.has-file {
    color: #111827;
    font-weight: 500;
}

/* Drag hint text */
.efmpro-upload-drag {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .efmpro-upload-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .efmpro-upload-btn {
        width: 100%;
    }
}

/* ===========================================
   EMAIL OTP VERIFICATION
   =========================================== */

.efmpro-otp-container {
    margin-top: 12px;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.efmpro-otp-container.verified {
    background: #f0fdf4;
    border-color: #86efac;
}

.efmpro-otp-row {
    margin-bottom: 10px;
}

.efmpro-otp-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #6366f1;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.efmpro-otp-send-btn:hover {
    background: #4f46e5;
}

.efmpro-otp-send-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.efmpro-otp-verify {
    margin-top: 12px;
}

.efmpro-otp-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.efmpro-otp-input {
    width: 160px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
    text-align: center;
    transition: border-color 0.2s;
}

.efmpro-otp-input:focus {
    border-color: #6366f1;
    outline: none;
}

.efmpro-otp-verify-btn {
    padding: 10px 20px;
    background: #10b981;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.efmpro-otp-verify-btn:hover {
    background: #059669;
}

.efmpro-otp-verify-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.efmpro-otp-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.efmpro-otp-timer {
    font-size: 13px;
    color: #64748b;
}

.efmpro-otp-resend-btn {
    padding: 6px 12px;
    background: transparent;
    color: #6366f1 !important;
    border: 1px solid #6366f1;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.efmpro-otp-resend-btn:hover {
    background: #6366f1;
    color: #fff !important;
}

.efmpro-otp-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.efmpro-otp-status.success {
    color: #10b981;
}

.efmpro-otp-status.error {
    color: #ef4444;
}

.efmpro-email-verified {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
}

/* ===========================================
   MATH CAPTCHA
   =========================================== */

.efmpro-captcha-container {
    margin-top: 15px;
    padding: 15px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 8px;
}

.efmpro-captcha-container.verified {
    background: #f0fdf4;
    border-color: #86efac;
}

.efmpro-captcha-question {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.efmpro-captcha-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.efmpro-captcha-answer {
    width: 120px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.efmpro-captcha-answer:focus {
    border-color: #6366f1;
    outline: none;
}

.efmpro-captcha-refresh {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.efmpro-captcha-refresh:hover {
    background: #e2e8f0;
}

.efmpro-captcha-refresh.spinning {
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.efmpro-captcha-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.efmpro-captcha-status.success {
    color: #10b981;
}

.efmpro-captcha-status.error {
    color: #ef4444;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 480px) {
    .efmpro-otp-input-row,
    .efmpro-captcha-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .efmpro-otp-input,
    .efmpro-captcha-answer {
        width: 100%;
    }
    
    .efmpro-otp-verify-btn,
    .efmpro-captcha-refresh {
        width: 100%;
    }
}
