/*!
 * =============================================================================
 * GPS HEADER
 * =============================================================================
 * PURPOSE      : Publieke counterpart van de SL UI helpers in dashboard.css.
 *                Bevat toast-systeem, skeleton-loaders en inline-validatie
 *                stylings, plus de nieuwe Premium-vs-Concierge differentiatie
 *                voor het unified lead-formulier (sinds 2026-06).
 *
 *                Wordt enqueued op single-sportschool en single-sportschool_abo
 *                (en eventueel meer publieke pagina's waar SL.toast nodig is).
 *
 * PATH         : wp-content/themes/sportlist/css/sl-ui.css
 *
 * DEPENDENCIES : Geen. Verwacht wel tokens.css-variabelen
 *                (--primary-color, --white-color, --color-accent, --color-error)
 *                maar valt terug op hardcoded waarden als die niet bestaan.
 *
 * =============================================================================
 * CSS-VARIABELEN
 * =============================================================================
 *   --primary-color, --white-color
 *   --color-accent (Premium kleur, fallback #004aad)
 *
 * =============================================================================
 * SECTIONOVERZICHT
 * =============================================================================
 *   1. TOAST-SYSTEEM (.sl-toast-stack, .sl-toast)
 *   2. SKELETON-LOADERS (.sl-skeleton)
 *   3. INLINE-VALIDATIE (.sl-field-hint, .sl-field--invalid)
 *   4. LEAD-FORM ROUTING (premium vs concierge promise + cta-styling)
 *   5. RESPONSIVE
 *
 * @package Sportlist
 */

/* ============================================================
   1. TOAST-SYSTEEM
   ============================================================ */
.sl-toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.sl-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    padding: 12px 14px 12px 16px;
    border-radius: 12px;
    background: var(--white-color, #ffffff);
    color: #2a2f36;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    border-left: 4px solid #27ae60;
    font-size: 0.95rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
}

.sl-toast--visible { opacity: 1; transform: translateY(0) scale(1); }
.sl-toast--leaving { opacity: 0; transform: translateY(-8px) scale(0.98); }

.sl-toast__icon {
    font-size: 22px;
    color: #27ae60;
    flex-shrink: 0;
}

.sl-toast__body { flex: 1; word-break: break-word; }

.sl-toast__action {
    background: none;
    border: none;
    color: var(--primary-color, #004aad);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.sl-toast__action:hover,
.sl-toast__action:focus-visible {
    background: rgba(0, 74, 173, 0.08);
    outline: none;
}

.sl-toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #8b92a0;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.sl-toast__close .material-icons { font-size: 18px; }

.sl-toast__close:hover,
.sl-toast__close:focus-visible {
    color: #2a2f36;
    background: rgba(0, 0, 0, 0.05);
    outline: none;
}

.sl-toast--success { border-left-color: #27ae60; }
.sl-toast--success .sl-toast__icon { color: #27ae60; }
.sl-toast--error   { border-left-color: #c0392b; }
.sl-toast--error   .sl-toast__icon { color: #c0392b; }
.sl-toast--warning { border-left-color: #e67e22; }
.sl-toast--warning .sl-toast__icon { color: #e67e22; }
.sl-toast--info    { border-left-color: #2980b9; }
.sl-toast--info    .sl-toast__icon { color: #2980b9; }

/* ============================================================
   2. SKELETON-LOADERS
   ============================================================ */
@keyframes sl-skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.sl-skeleton {
    background: linear-gradient(90deg, #eceff3 0%, #f6f8fb 50%, #eceff3 100%);
    background-size: 200% 100%;
    animation: sl-skeleton-shimmer 1.4s ease-in-out infinite;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.sl-skeleton::placeholder { color: transparent; }
.sl-skeleton--input { border-color: #e0e4eb; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
    .sl-skeleton { animation: none; }
}

/* ============================================================
   3. INLINE VALIDATIE
   ============================================================ */
.sl-field-hint {
    display: block;
    font-size: 0.82em;
    color: var(--gray-color, #6b7280);
    margin-top: 4px;
    line-height: 1.35;
    min-height: 1em;
    transition: color 0.2s ease;
}

.sl-field-hint--error { color: #c0392b; }

.sl-field--invalid,
[aria-invalid="true"].sl-field--invalid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.sl-field--invalid:focus,
[aria-invalid="true"].sl-field--invalid:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

/* ============================================================
   4. LEAD-FORM ROUTING (premium vs concierge)
   ============================================================ */

/* Honeypot: zichtbaar voor bots, niet voor mensen. */
.sl-lead-form__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Response-promise — kleine badge onder de submit-button + boven het form */
.sl-lead-promise {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.35;
    margin: 6px auto 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 74, 173, 0.06);
    color: var(--primary-color, #004aad);
    font-weight: 600;
}

.sl-lead-form__promise {
    display: block;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
}

/* Premium routing — accent + verified icon-stijl */
.sl-lead-section--premium .sl-lead-promise {
    background: rgba(0, 74, 173, 0.1);
    color: var(--color-accent, #004aad);
}
.sl-lead-section--premium .sl-lead-promise::before {
    content: 'bolt';
    font-family: 'Material Icons';
    font-size: 16px;
    line-height: 1;
}

/* Concierge routing — neutraal grijs met Sportlist-mark */
.sl-lead-section--concierge .sl-lead-promise {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}
.sl-lead-section--concierge .sl-lead-promise::before {
    content: 'support_agent';
    font-family: 'Material Icons';
    font-size: 16px;
    line-height: 1;
}

/* CTA-variant op abo-pagina (single-sportschool_abo.php) */
.sl-pricing-card__cta.sl-lead-cta--premium {
    /* Premium = direct manager, sterke accent + bolt-icon */
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.18);
}

.sl-pricing-card__cta.sl-lead-cta--concierge {
    /* Concierge = via Sportlist, neutraal blauw met support-icon */
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
}

/* Verified Responder badge (gym moet response_rate >= 80% hebben — server-side gegating) */
.sl-verified-responder {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 74, 173, 0.1);
    color: var(--color-accent, #004aad);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}
.sl-verified-responder .material-icons { font-size: 14px; }

/* Modal animatie + reduced-motion-guard. */
.premium-modal[hidden] { display: none !important; }

.premium-modal {
    /* Existing modal CSS in style.css zorgt voor positioning.
       Hier alleen entry-transitie + reduced-motion fallback. */
    animation: sl-modal-fade 0.18s ease-out;
}

@keyframes sl-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .premium-modal { animation: none; }
    .sl-toast { transition: none; }
}

/* ============================================================
   5. RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .sl-toast-stack {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
    .sl-toast { min-width: 0; width: 100%; }
    .sl-lead-promise { font-size: 0.8rem; padding: 5px 10px; }
}
