/* Form Motivador - Componente reutilizable con Popup */

/* Overlay del popup */
.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9998;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.form-overlay.active {
    display: flex;
}

/* Botón flotante para abrir el formulario */
.form-trigger-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    font-size: 24px;
}

.form-trigger-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

/* Contenedor del formulario */
.form-motivador-container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Botón cerrar */
.form-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.form-close-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Header */
.form-motivador-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
}

.form-motivador-header h1,
.form-motivador-header h3 {
    font-size: 1.5em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.form-motivador-header p {
    font-size: 0.95em;
    opacity: 0.9;
    line-height: 1.4;
}

/* Form container */
.form-motivador-body {
    padding: 30px 30px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

/* Form groups */
.form-motivador-group {
    margin-bottom: 25px;
}

.form-motivador-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.form-required {
    color: #e74c3c;
}

.form-motivador-input,
.form-motivador-select,
.form-motivador-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-motivador-input:focus,
.form-motivador-select:focus,
.form-motivador-textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-motivador-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Submit button */
.form-motivador-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-motivador-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.form-motivador-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.form-motivador-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.form-motivador-loading.active {
    display: block;
}

.form-motivador-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4facfe;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.form-motivador-message {
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

.form-motivador-message.active {
    display: block;
}

.form-motivador-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-motivador-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-emoji {
    font-size: 1.5em;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-motivador-container {
        margin: 10px;
        border-radius: 15px;
        max-height: 95vh;
    }

    .form-motivador-header {
        padding: 15px 20px;
    }

    .form-motivador-header h1,
    .form-motivador-header h3 {
        font-size: 1.3em;
    }

    .form-motivador-header p {
        font-size: 0.9em;
    }

    .form-motivador-body {
        padding: 25px 20px;
        max-height: calc(90vh - 80px);
    }

    .form-trigger-btn {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
        font-size: 20px;
    }
}

/* Scrollbar personalizado */
.form-motivador-body::-webkit-scrollbar {
    width: 8px;
}

.form-motivador-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-motivador-body::-webkit-scrollbar-thumb {
    background: #4facfe;
    border-radius: 10px;
}

.form-motivador-body::-webkit-scrollbar-thumb:hover {
    background: #3a8cd4;
}
