/**
 * Red de Clubes Adaptados — Estilos base del plugin
 * Diseñados para ser fácilmente sobreescritos por el tema activo.
 *
 * Estas variables espejan las del theme (assets/css/theme.css). Si cambiás
 * la paleta en el theme, actualizá también este bloque para que el plugin
 * (chips de filtro, cards de lugares, botones, formularios) se mantenga
 * visualmente consistente incluso si se usa con otro theme.
 */
: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-accent-light: #fce4ef;

  --ap-text: #0d0a2e;
  --ap-text-muted: #6b6a8a;
  --ap-text-light: #74738d; /* corregido para WCAG AA */

  --ap-bg-soft: #f5f3ff;
  --ap-border: #cbcbcb; /* corregido para WCAG 1.4.11, ver theme.css */

  --ap-gradient-primary: linear-gradient(135deg, #7c3aed, #b5179e);

  --shadow-sm: 0 1px 3px rgba(43, 39, 135, 0.08);
  --shadow-md: 0 4px 14px rgba(43, 39, 135, 0.12);
  --shadow-lg: 0 10px 36px rgba(43, 39, 135, 0.18);
}

/* ─── Utilidades ─── */
.ap-hidden-coord {
  display: none !important;
}

.ap-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Layout toolbar (búsqueda y archivos de taxonomía) ─── */
.ap-search-wrap--toolbar,
.ap-archive-wrap.ap-search-wrap--toolbar {
  max-width: 1200px;
  margin: 0 auto;
}

.ap-search-results {
  min-width: 0;
}

/* ─── Barra de filtros (chips horizontales) ─── */
.ap-toolbar {
  margin-bottom: 24px;
}

.ap-toolbar__chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ap-border);
}

.ap-toolbar__clear {
    margin-left: auto;
    flex-shrink: 0;
}

.ap-toolbar__clear--disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ─── Chip individual + su panel desplegable ─── */
.ap-chip-field {
  position: relative;
  /* z-index crea un contexto de apilamiento que garantiza que el panel
     flotante quede siempre por encima de las cards de resultados */
  z-index: 10;
}

/* Chip abierto sube más para que su panel quede definitivamente encima */
.ap-chip-field:has(.ap-chip[aria-expanded="true"]),
.ap-chip-field.is-open {
  z-index: 100;
}

.ap-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #ced4da;
  border-radius: 20px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.ap-chip:hover {
  border-color: var(--ap-primary);
}

.ap-chip.is-active {
  border-color: var(--ap-primary);
  background: var(--ap-primary-light);
  color: var(--ap-primary);
}

.ap-chip[aria-expanded="true"] {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.ap-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ap-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ap-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.ap-chip--filters {
  border-radius: 6px;
}

.ap-chip-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: 280px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 16px;
}

.ap-chip-panel[hidden] {
  display: none;
}

.ap-chip-panel--combo {
  padding: 8px;
}

/* El combobox dentro del chip no necesita su propio borde/fondo de input
   extra, ya vive dentro del panel flotante */
.ap-chip-panel--combo .ap-combo__input {
  border-color: var(--ap-border);
}

/* ─── Modal de filtros secundarios ─── */
.ap-filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
}

.ap-filters-overlay[hidden] {
  display: none;
}

.ap-filters-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  width: min(420px, 90vw);
  max-height: 85vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.ap-filters-modal[hidden] {
  display: none;
}

.ap-filters-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ap-border);
  flex-shrink: 0;
}

.ap-filters-modal__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.ap-filters-modal__close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  padding: 0 4px;
}

.ap-filters-modal__body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ap-filters-modal__footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--ap-border);
  flex-shrink: 0;
}

.ap-filters-modal__footer .rca-btn {
  flex: 1;
  text-align: center;
}

body.ap-filters-locked {
  overflow: hidden;
}

/* ─── Contenido interno de cada filtro (combobox, checkboxes con buscador) ─── */
.ap-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ap-filter-group__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  display: block;
}

.ap-filter-group input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
  box-sizing: border-box;
}

.ap-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 0;
}

/* ─── Combobox de provincia/ciudad ─── */
.ap-combo {
  position: relative;
}

.ap-combo__input {
  width: 100%;
  padding: 8px 30px 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
  box-sizing: border-box;
}

.ap-combo__input:disabled {
  background: #eee;
  cursor: not-allowed;
}

.ap-combo__input:focus {
  outline: none;
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.ap-combo__clear {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ap-text-light);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
}

/* display:flex en la regla base gana sobre [hidden] del navegador —
   hay que forzarlo explícitamente igual que hacemos con otros elementos */
.ap-combo__clear[hidden] {
  display: none;
}

.ap-combo__clear:hover {
  background: #f0f0f0;
  color: #333;
}

.ap-combo__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.ap-combo__list[hidden] {
  display: none;
}

.ap-combo__option {
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.ap-combo__option:hover,
.ap-combo__option.is-active {
  background: var(--ap-primary-light);
  color: var(--ap-primary);
}

.ap-combo__empty {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--ap-text-light);
}

/* ─── Buscador sobre grupos de checkboxes (Patrón B) ─── */
.ap-filter-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #fff;
  box-sizing: border-box;
}

.ap-filter-search:focus {
  outline: none;
  border-color: var(--ap-primary);
}

.ap-checkbox-list {
  border: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ap-checkbox-list__empty {
  font-size: 0.85rem;
  color: var(--ap-text-light);
  margin: 4px 0 0;
}

/* ─── Paginación ─── */
.ap-pagination {
  margin-top: 24px;
}

.ap-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ap-pagination a,
.ap-pagination span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--ap-border);
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ap-primary);
}

.ap-pagination .current {
  background: var(--ap-primary);
  color: #fff;
  border-color: var(--ap-primary);
}

/* ─── Botones ─── */
.rca-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--ap-gradient-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
}

.rca-btn:hover {
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
  color: #fff;
}
.rca-btn:active {
  transform: scale(0.97);
}

.rca-btn--secondary {
  background: transparent;
  border: 1px solid var(--ap-primary);
  color: var(--ap-primary);
  margin-left: 8px;
}

.rca-btn--secondary:hover {
  background: var(--ap-primary-light);
  color: var(--ap-primary);
  box-shadow: none;
}

.rca-btn--sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ─── Resultados ─── */
.ap-results__count {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 16px;
}

.ap-places-list {
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .ap-places-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .ap-places-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Card de lugar ─── */
.ap-place-card {
  position: relative;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
    box-shadow: var(--shadow-sm);
}

.ap-place-card:hover {
    box-shadow: var(--shadow-md);
}

.ap-place-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ap-primary-light, #ede9fe);
  flex-shrink: 0;
}

.ap-place-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.ap-place-card:hover .ap-place-card__thumb img {
  transform: scale(1.04);
}

.ap-place-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ap-place-card__title {
  font-size: 1.1rem;
  margin: 0;
}

.ap-place-card__title a {
  text-decoration: none;
  color: var(--ap-text);
}

.ap-place-card__location {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.ap-place-card__phone {
  font-size: 0.9rem;
  margin: 0;
}

.ap-place-card__phone a {
  color: #333;
  text-decoration: none;
}

.ap-place-card__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ap-place-card__tags li {
  background: var(--ap-primary-light);
  color: var(--ap-primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
}

/* ─── Mapa ─── */
#ap-map {
    z-index: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--ap-border);
}

/* ─── Sin resultados ─── */
.ap-no-results {
  padding: 32px;
  text-align: center;
  color: #666;
  background: var(--ap-bg-soft);
  border-radius: 8px;
}

/* ─── Responsive ─── */

@media (max-width: 900px) {
  .ap-toolbar__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .ap-toolbar__chips::-webkit-scrollbar {
    display: none;
  }

  .ap-toolbar__clear {
    margin-left: 10px; /* En scroll horizontal no puede quedar pegado al borde derecho */
  }

}

@media (max-width: 640px) {
  .ap-chip-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    /* Animación: empieza abajo, sube al abrirse */
    transform: translateY(100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Estado "entrando" — se agrega via JS con requestAnimationFrame */
  .ap-chip-panel.is-entering {
    transform: translateY(0);
  }

  /* El contenido scrolleable va en un wrapper separado para que
     el footer quede fijo abajo */
  .ap-chip-panel > *:not(.ap-chip-panel__footer) {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
  }

  .ap-chip-panel__footer {
    flex-shrink: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--ap-border, #9691ac);
    background: #fff;
    position: sticky;
    bottom: 0;
  }
}

/* Desktop: ocultar el footer del panel (solo es útil en mobile) */
@media (min-width: 641px) {
  .ap-chip-panel__footer {
    display: none;
  }
}

body.ap-filters-locked {
  overflow: hidden;
}

@media (max-width: 600px) {
  .ap-places-list {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════
   FAVORITOS
══════════════════════════════════════════ */
.ap-fav-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #ccc;
  transition:
    color 0.15s,
    transform 0.1s;
  padding: 4px;
  line-height: 1;
  z-index: 10;
}

.ap-fav-btn:hover {
  color: #e74c3c;
  transform: scale(1.15);
}
.ap-fav-btn.is-favorite {
  color: #e74c3c;
}
.ap-fav-btn--login {
  text-decoration: none;
}

/* ══════════════════════════════════════════
   TAGS DE DEPORTE (en cards)
══════════════════════════════════════════ */
.ap-place-card__tags--sport li {
  background: var(--ap-accent-light);
  color: var(--ap-accent-dark);
}

.ap-place-card__tags--sport li a {
  color: inherit;
  text-decoration: none;
}

.ap-place-card__tags--sport li a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════
   AUTH — Login / Registro
══════════════════════════════════════════ */
.ap-auth-wrap {
  max-width: 520px;
  margin: 0 auto;
}

.ap-auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--ap-border);
  margin-bottom: 24px;
}

.ap-auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.ap-auth-tab.is-active {
  color: var(--ap-primary);
  border-bottom-color: var(--ap-primary);
}

.ap-auth-panel {
  display: none;
}
.ap-auth-panel.is-active {
  display: block;
}

.ap-auth-messages {
  margin-bottom: 16px;
}

.ap-auth-form .ap-field {
  margin-bottom: 18px;
}

.ap-auth-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Roles como cards seleccionables */
.ap-role-option {
  align-items: flex-start;
}

.ap-role-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ap-border);
  border-radius: 8px;
  padding: 12px 16px;
  transition:
    border-color 0.15s,
    background 0.15s;
  cursor: pointer;
  flex: 1;
}

.ap-role-option input:checked + .ap-role-card {
  border-color: var(--ap-primary);
  background: var(--ap-primary-light);
}

.ap-role-card strong {
  font-size: 0.95rem;
}
.ap-role-card small {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

.ap-athlete-fields {
  background: var(--ap-bg-soft);
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 12px;
}

/* ══════════════════════════════════════════
   PERFIL — Panel de usuario
══════════════════════════════════════════ */
.ap-profile-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.ap-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ap-border);
  margin-bottom: 28px;
  gap: 0;
}

.ap-profile-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}

.ap-profile-tab.is-active {
  color: var(--ap-primary);
  border-bottom-color: var(--ap-primary);
}

.ap-profile-panel {
  display: none;
}
.ap-profile-panel.is-active {
  display: block;
}

.ap-profile-messages {
  margin-bottom: 16px;
}

.ap-profile-form .ap-field {
  margin-bottom: 18px;
}

.ap-profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ap-border);
  flex-wrap: wrap;
}

/* Campo row (dos columnas) */
.ap-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Input de contraseña con botón de toggle */
.ap-input-password-wrap {
  position: relative;
  display: flex;
}

.ap-input-password-wrap .ap-input {
  padding-right: 44px;
  flex: 1;
}

.ap-toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
}

/* ══════════════════════════════════════════
   MIS LUGARES (lista en el perfil)
══════════════════════════════════════════ */
.ap-my-places-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-my-place-item {
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.ap-my-place-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ap-my-place-item__title {
  font-size: 1rem;
}

.ap-my-place-item__title a {
  color: var(--ap-primary);
  text-decoration: none;
}

.ap-my-place-item__rejection {
  font-size: 0.85rem;
  color: #721c24;
  background: #f8d7da;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0 0;
}

.ap-my-place-item__meta {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  margin-top: 6px;
}

.ap-my-place-item__meta a {
  color: var(--ap-primary);
}

/* Badges de estado */
.ap-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.ap-status-badge.is-published {
  background: #d4edda;
  color: #155724;
}
.ap-status-badge.is-pending {
  background: #fff3cd;
  color: #856404;
}
.ap-status-badge.is-draft {
  background: #e2e3e5;
  color: #383d41;
}
.ap-status-badge.is-rejected {
  background: #f8d7da;
  color: #721c24;
}

/* ══════════════════════════════════════════
   CAMPOS DE PERFIL (shared)
══════════════════════════════════════════ */
.ap-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #333;
}

.ap-label--required::after {
  content: " *";
  color: #dc3545;
}

.ap-input,
.ap-select,
.ap-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;
}

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

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

.ap-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  margin-top: 4px;
}
.ap-error {
  display: block;
  font-size: 0.82rem;
  color: #dc3545;
  margin-top: 4px;
  min-height: 1em;
}

.ap-fieldset {
  border: 1px solid var(--ap-border);
  border-radius: 6px;
  padding: 16px;
  margin: 0;
}

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

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

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

/* ══════════════════════════════════════════
   BOTONES (compartidos)
══════════════════════════════════════════ */
.rca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.2;
}

.rca-btn--primary {
  background: var(--ap-primary);
  color: #fff;
  border-color: var(--ap-primary);
}
.rca-btn--primary:hover {
  background: var(--ap-primary-dark);
  border-color: var(--ap-primary-dark);
  color: #fff;
}
.rca-btn--primary:disabled {
  background: #7fb3cc;
  border-color: #7fb3cc;
  cursor: not-allowed;
}

.rca-btn--tertiary {
  background: transparent;
  color: var(--ap-primary);
  border-color: var(--ap-primary);
}
.rca-btn--tertiary:hover {
  background: var(--ap-primary-light);
  color: var(--ap-primary);
}

.rca-btn--sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: 1rem;
  -webkit-border-radius: 1rem;
  -moz-border-radius: 1rem;
  -ms-border-radius: 1rem;
  -o-border-radius: 1rem;
}

/* ══════════════════════════════════════════
   NOTICES
══════════════════════════════════════════ */
.ap-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

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

/* ══════════════════════════════════════════
   CONTACTO
══════════════════════════════════════════ */
.ap-contact-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.ap-contact-form .ap-field {
  margin-bottom: 18px;
}

.ap-contact-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ap-border);
}

/* Honeypot: oculto de forma accesible, invisible para personas pero presente para bots */
.ap-contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   RESPONSIVE ADICIONAL
══════════════════════════════════════════ */
@media (max-width: 520px) {
  .ap-field-row {
    grid-template-columns: 1fr;
  }
  .ap-profile-tab {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .ap-auth-tabs {
    flex-direction: column;
    border-bottom: none;
  }
  .ap-auth-tab {
    border-bottom: 1px solid var(--ap-border);
    border-left: 3px solid transparent;
  }
  .ap-auth-tab.is-active {
    border-left-color: var(--ap-primary);
    border-bottom-color: var(--ap-border);
  }
  .ap-checkboxes {
    grid-template-columns: 1fr 1fr;
  }
}


/* ─── Overlay mobile para chips ─── */
#ap-chip-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
}

@media (min-width: 641px) {
  #ap-chip-overlay { display: none !important; }
}
