/**
 * Mensajes de formulario (contacto, newsletter) — tema oscuro alineado con MAC.
 * Honeypot anti-spam: .form-honeypot (oculto visualmente, visible para lectores si se quita el truco).
 */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--mac-accent, #d4ff00);
    color: var(--mac-on-accent, #0a0a0a);
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}

.form-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.form-honeypot label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.45;
    animation: form-flash-in 0.3s ease;
}

.form-flash svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.form-flash__text {
    flex: 1;
    min-width: 0;
}

.form-flash--success {
    background: rgba(212, 255, 0, 0.1);
    border: 1px solid rgba(212, 255, 0, 0.28);
    color: #ecfccb;
}

.form-flash--error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.form-flash--info {
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #dbeafe;
}

.form-flash--loading {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e7e5e4;
}

.form-spinner {
    animation: form-spin 0.9s linear infinite;
}

@keyframes form-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-cta {
    color: var(--mac-accent, #d4ff00);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.form-cta:hover {
    text-decoration: underline;
}

.form-cta--ghost {
    margin-left: 0.5rem;
    color: var(--mac-text-muted, #a8a29e);
    font-weight: 600;
    white-space: nowrap;
}

.form-cta--ghost:hover {
    color: var(--mac-text, #f5f5f4);
    text-decoration: underline;
}

.form-next {
    margin-left: 0.4rem;
    color: var(--mac-text-muted, #a8a29e);
    white-space: nowrap;
}

.field-help {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: #fecaca;
}

input.is-invalid,
textarea.is-invalid {
    border-color: rgba(248, 113, 113, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}

/* Utilidad SR-only para data hooks / accesibilidad */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes form-flash-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#contact-message:empty,
#newsletter-message:empty {
    display: none;
}

#contact-message:not(:empty) {
    display: block;
    margin-top: 1rem;
}

body.mac-landing.mac-contact #contact-message:not(:empty) {
    margin-top: 0;
    margin-bottom: 1rem;
}

#newsletter-message:not(:empty) {
    display: block;
    margin-top: 1rem;
}
