/* ========== FOCUS VISIBLE ========== */
*:focus-visible {
    outline: 3px solid #3BB8B9;
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
    outline-color: #3BB8B9;
}
*:focus:not(:focus-visible) {
    outline: none;
}

/* ========== LOADING SPINNER ========== */
.hnv-spinner {
    display: inline-block;
    width: 24px; height: 24px;
    border: 3px solid rgba(59,184,185,0.2);
    border-top-color: #3BB8B9;
    border-radius: 50%;
    animation: hnv-spin 0.8s linear infinite;
}
.hnv-spinner-large {
    width: 48px; height: 48px; border-width: 4px;
}
@keyframes hnv-spin {
    to { transform: rotate(360deg); }
}

/* ========== SKELETON LOADER ========== */
.hnv-skeleton {
    background: linear-gradient(90deg, #e8e4dd 0%, #f5f2ec 50%, #e8e4dd 100%);
    background-size: 200% 100%;
    animation: hnv-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes hnv-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== FORM ERROR STATES ========== */
.hnv-field-error {
    border-color: #c47a6c !important;
    background: rgba(196,122,108,0.05);
}
.hnv-field-error-message {
    color: #c47a6c;
    font-size: 0.82rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hnv-field-error-message::before {
    content: '⚠';
    font-size: 0.9rem;
}
.hnv-field-success {
    border-color: #6b8f7b !important;
}

/* ========== TOAST NOTIFICATIONS ========== */
.hnv-toast-container {
    position: fixed;
    top: 24px; right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.hnv-toast {
    background: #253564;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    max-width: 360px;
    animation: hnv-toast-in 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hnv-toast.success { background: #6b8f7b; }
.hnv-toast.error { background: #c47a6c; }
.hnv-toast.info { background: #253564; }
@keyframes hnv-toast-in {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== SKIP LINK (accessibility) ========== */
.hnv-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #253564;
    color: #fff;
    padding: 12px 20px;
    text-decoration: none;
    z-index: 10001;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.hnv-skip-link:focus {
    top: 0;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
