/**
 * Red de Clubes Adaptados — Formulario de Registro
 * Estilos base sobreescribibles por el tema.
 *
 * Mismas variables que accesible-places.css y theme.css, repetidas acá
 * porque este plugin puede activarse de forma independiente. Si cambiás
 * la paleta de marca, actualizá los tres bloques para mantener consistencia.
 */
:root {
    --ap-primary:        #7c3aed;
    --ap-primary-dark:   #2b2787;
    --ap-primary-light:  #ede9fe;
    --ap-accent:         #de2177; /* corregido para WCAG AA, ver theme.css */
    --ap-accent-dark:    #b5179e;
    --ap-text-muted:     #6b6a8a;
    --ap-border:         #9691ac; /* corregido para WCAG 1.4.11, ver theme.css */
    --ap-fill-subtle:    #ddd6fe; /* fondo claro original, distinto de --ap-border ya oscurecido */
    --ap-gradient-primary: linear-gradient(135deg, #7c3aed, #b5179e);
}

/* ─── Contenedor ─── */
.apf-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-size: 1rem;
}

/* ─── Indicador de progreso ─── */
.apf-progress {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    gap: 0;
    counter-reset: step;
}

.apf-progress__step {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ap-text-muted);
    padding: 10px;
    border-bottom: 3px solid var(--ap-border);
    position: relative;
}

.apf-progress__step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ap-fill-subtle);
    color: var(--ap-primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 6px;
}

.apf-progress__step.is-active {
    color: var(--ap-primary);
    border-bottom-color: var(--ap-primary);
    font-weight: 600;
}

.apf-progress__step.is-active span {
    background: var(--ap-primary);
    color: #fff;
}

.apf-progress__step.is-done {
    color: #28a745;
    border-bottom-color: #28a745;
}

.apf-progress__step.is-done span {
    background: #28a745;
    color: #fff;
}

/* ─── Títulos ─── */
.apf-step-title {
    font-size: 1.4rem;
    margin: 0 0 8px;
}

.apf-step-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 24px;
}

/* ─── Mensajes ─── */
.apf-messages { margin-bottom: 16px; }

.apf-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.apf-notice--info    { background: var(--ap-primary-light); border: 1px solid #b8daff; color: #004085; }
.apf-notice--success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.apf-notice--warning { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.apf-notice--error   { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* ─── Campos ─── */
.apf-field {
    margin-bottom: 20px;
}

.apf-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #333;
}

.apf-label--required::after {
    content: ' *';
    color: #dc3545;
}

.apf-optional {
    font-weight: 400;
    color: var(--ap-text-muted);
    font-size: 0.85rem;
}

.apf-input,
.apf-select,
.apf-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.apf-input:focus,
.apf-select:focus,
.apf-textarea:focus {
    outline: none;
    border-color: var(--ap-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.apf-input.has-error,
.apf-select.has-error {
    border-color: #dc3545;
}

.apf-textarea { resize: vertical; }

.apf-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--ap-text-muted);
    margin-top: 4px;
}

.apf-error {
    display: block;
    font-size: 0.82rem;
    color: #dc3545;
    margin-top: 4px;
    min-height: 1em;
}

/* ─── Fieldset / checkboxes ─── */
.apf-fieldset {
    border: 1px solid var(--ap-border);
    border-radius: 6px;
    padding: 16px;
    margin: 0;
}

.apf-fieldset legend.apf-label {
    padding: 0 6px;
    float: none;
    width: auto;
}

.apf-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.apf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.1s;
}

.apf-checkbox-label:hover { background: #f0f0f0; }

.apf-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--ap-primary);
}

/* ─── Input con prefijo ─── */
.apf-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden;
}

.apf-input-prefix {
    padding: 10px 12px;
    background: #f0f0f0;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    border-right: 1px solid #ced4da;
}

.apf-input--prefixed {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
}

/* ─── Horarios ─── */
.apf-hours-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.apf-select--day   { flex: 1; min-width: 120px; }
.apf-input--time   { width: 110px; flex-shrink: 0; }
.apf-hours-sep     { font-size: 0.85rem; color: #666; }

.apf-btn-remove-hour {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.apf-btn-remove-hour:hover { background: #f8d7da; }

/* ─── Botones ─── */
.apf-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--ap-border);
    flex-wrap: wrap;
}

.apf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.2;
}

.apf-btn--primary {
    background: var(--ap-gradient-primary);
    color: #fff;
    border-color: transparent;
}

.apf-btn--primary:hover  { box-shadow: 0 4px 14px rgba(124,58,237,.25); color: #fff; }
/* WCAG exime a elementos disabled del requisito de contraste (no son
   interactivos), así que este bajo contraste es intencional. No copiar
   este patrón de color para botones/estados que sí respondan a un click. */
.apf-btn--primary:disabled { background: var(--ap-fill-subtle); border-color: var(--ap-fill-subtle); color: var(--ap-text-muted); cursor: not-allowed; box-shadow: none; }

.apf-btn--ghost {
    background: transparent;
    color: var(--ap-primary);
    border-color: var(--ap-primary);
}

.apf-btn--ghost:hover { background: var(--ap-primary-light); color: var(--ap-primary); }

.apf-btn--small { padding: 7px 14px; font-size: 0.85rem; }

/* ─── Responsive ─── */
@media (max-width: 520px) {
    .apf-progress__step span { display: none; }
    .apf-checkboxes { grid-template-columns: 1fr 1fr; }
    .apf-hours-row { gap: 4px; }
    .apf-input--time { width: 90px; }
}
