/**
 * HAON Platform - Contacto Styles (v2)
 * Form, confirmation, module selector
 */

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */
.contacto-section {
    background: rgba(255, 255, 255, 0.03);
}

.contacto-form {
    margin-top: 35px;
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-full {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.form-group label {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 500;
}

.required {
    color: #E84855;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1em;
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: all var(--transition-base);
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5BA3E8;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(91, 163, 232, 0.15);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' fill='none' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: #1a2332;
    color: #fff;
}

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

/* Input con error */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #E84855;
    box-shadow: 0 0 0 3px rgba(232, 72, 85, 0.15);
}

.form-error {
    font-size: 0.85em;
    color: #E84855;
    min-height: 1.2em;
    display: block;
}

/* ============================================
   PRIVACIDAD CHECKBOX
   ============================================ */
.form-privacidad {
    margin-top: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.checkbox-label input:checked ~ .checkbox-custom {
    background: #5BA3E8;
    border-color: #5BA3E8;
}

.checkbox-label input:checked ~ .checkbox-custom::after {
    content: '\2713';
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.link-privacidad {
    color: #5BA3E8;
    text-decoration: underline;
}

.link-privacidad:hover {
    color: #00D4FF;
}

/* ============================================
   BOTÓN ENVIAR
   ============================================ */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-enviar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 50px;
    background: linear-gradient(135deg, #5BA3E8 0%, #1a5bb8 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 260px;
}

.btn-enviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 163, 232, 0.35);
}

.btn-enviar:active {
    transform: translateY(0);
}

.btn-enviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================
   MENSAJE GLOBAL
   ============================================ */
.form-mensaje-global {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 1em;
    text-align: center;
    line-height: 1.5;
}

.form-mensaje-global.success {
    background: rgba(72, 199, 142, 0.15);
    border: 1px solid rgba(72, 199, 142, 0.3);
    color: #48C78E;
}

.form-mensaje-global.error {
    background: rgba(232, 72, 85, 0.15);
    border: 1px solid rgba(232, 72, 85, 0.3);
    color: #E84855;
}

/* ============================================
   CONFIRMACIÓN (fallback no-JS)
   ============================================ */
.confirmacion-content {
    text-align: center;
    padding: 60px 40px;
}

.confirmacion-icon {
    font-size: 4em;
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto 25px;
    background: rgba(72, 199, 142, 0.15);
    border: 2px solid rgba(72, 199, 142, 0.3);
    border-radius: 50%;
    color: #48C78E;
}

.btn-volver {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #5BA3E8 0%, #1a5bb8 100%);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.btn-volver:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 163, 232, 0.35);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .btn-enviar {
        width: 100%;
        min-width: auto;
    }
}
