/*
 * Citaora — estilos públicos.
 * Hereda tipografía y colores del tema. Para personalizar, redefine estas variables en tu tema:
 *   --rp-accent, --rp-accent-contrast, --rp-danger, --rp-border, --rp-radius
 * Con Elementor, los widgets de Citaora tienen estos ajustes (y más) en su pestaña Estilo.
 */
.rp-app {
  --rp-accent: var(--wp--preset--color--primary, #2F6E6F);
  --rp-accent-contrast: var(--wp--preset--color--base, #ffffff);
  --rp-danger: #b42318;
  --rp-success: #067647;
  --rp-border: rgba(0, 0, 0, 0.25);
  --rp-soft: rgba(0, 0, 0, 0.04);
  --rp-radius: 8px;
  max-width: 760px;
  margin: 0 auto 2rem;
  font: inherit;
  color: inherit;
}

.rp-app *,
.rp-app *::before,
.rp-app *::after { box-sizing: border-box; }

.rp-app h3 { margin: 1.5rem 0 0.75rem; font-size: 1.25em; }
.rp-app h3:focus { outline: none; }
.rp-app h4 { margin: 0; font-size: 1em; }

/* Progreso: barra por tramos y «2 / 5» junto al título del paso */
.rp-progress { display: flex; gap: 4px; list-style: none; margin: 0 0 1rem; padding: 0; }
.rp-progress li { flex: 1; height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 14%, transparent); }
.rp-progress li.is-done { background: var(--rp-accent); }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rp-step h3 { display: flex; align-items: baseline; gap: 1rem; margin-top: 0.5rem; }
.rp-step-count { margin-left: auto; font-size: 0.75em; font-weight: 400; opacity: 0.7; }
.rp-step-hint { margin: -0.4rem 0 1rem; opacity: 0.8; }

/* Iconos del negocio (trazo con el color del texto) */
.rp-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; fill: none; stroke: currentColor; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }

/* Tarjetas para elegir categoría, servicio y profesional */
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 1fr; gap: 12px; margin: 0 0 1rem; } /* todas las tarjetas, del mismo alto */
@media (max-width: 380px) { .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rp-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; min-height: 120px; padding: 1rem 0.75rem; border: 1px solid var(--rp-border); border-radius: 16px; background: transparent; color: inherit; font: inherit; text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.rp-choice:hover { border-color: var(--rp-accent); }
.rp-choice.is-selected { border-color: var(--rp-accent); box-shadow: inset 0 0 0 1px var(--rp-accent); background: color-mix(in srgb, var(--rp-accent) 10%, transparent); }
.rp-choice.is-disabled { cursor: not-allowed; opacity: 0.5; background: var(--rp-soft); border-style: dashed; }
.rp-choice.is-disabled:hover { border-color: var(--rp-border); }
.rp-choice-icon { width: 48px; height: 48px; opacity: 0.85; }
.rp-choice.is-selected .rp-choice-icon { color: var(--rp-accent); opacity: 1; }
.rp-icon-img { object-fit: contain; opacity: 1; }
.rp-choice-title { font-weight: 600; line-height: 1.25; }
.rp-choice-sub { font-size: 0.85em; opacity: 0.8; font-variant-numeric: tabular-nums; }
.rp-choice-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; color: var(--rp-accent); }
/* Los temas suelen dar a los botones una sola línea, mayúsculas o altura fija: las tarjetas (que son botones) se protegen. */
.rp-app .rp-choice { white-space: normal; min-width: 0; height: auto; max-width: 100%; text-transform: none; letter-spacing: normal; word-spacing: normal; }
.rp-app .rp-choice-title, .rp-app .rp-choice-sub { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.rp-choice-badge { position: absolute; top: 8px; right: 8px; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--rp-accent); color: var(--rp-accent-contrast); font-size: 0.75em; font-weight: 600; }
.rp-step-extra p { margin: 0 0 0.5rem; }

.rp-user { margin: 0 0 1rem; }

/* Opciones (servicios y profesionales) */
.rp-group { border: 1px solid var(--rp-border); border-radius: var(--rp-radius); margin: 0 0 1rem; padding: 0.75rem 1rem; }
.rp-group legend { padding: 0 0.5rem; font-weight: 600; }
.rp-option { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid var(--rp-soft); }
.rp-option:first-of-type { border-top: 0; }
.rp-option input { margin-top: 0.4rem; width: 1.25rem; height: 1.25rem; flex: none; }
.rp-option label { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; cursor: pointer; min-height: 44px; justify-content: center; }
.rp-option-name { font-weight: 600; }
.rp-option-desc, .rp-muted, .rp-hint { font-size: 0.9em; opacity: 0.8; }
.rp-option-meta { font-variant-numeric: tabular-nums; }

/* Fecha y huecos */
.rp-slot-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
.rp-slot-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Calendario mensual */
.rp-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; max-width: 420px; margin: 0 auto 0.5rem; }
.rp-cal-title { margin: 0; text-align: center; flex: 1; }
.rp-cal-grid-wrap { max-width: 420px; margin: 0 auto 1rem; }
.rp-cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.rp-cal th { font-size: 0.85em; text-align: center; padding: 0.25rem 0; }
.rp-cal td { padding: 0; }
.rp-cal-day { width: 100%; aspect-ratio: 1 / 1; min-height: 40px; border: 0; border-radius: var(--rp-radius); background: transparent; color: inherit; opacity: 0.4; font: inherit; cursor: default; padding: 0; }
.rp-cal-free { background: color-mix(in srgb, var(--rp-accent) 15%, transparent); opacity: 1; font-weight: 700; cursor: pointer; }
.rp-cal-free:hover { background: color-mix(in srgb, var(--rp-accent) 28%, transparent); }
.rp-cal-selected { background: var(--rp-accent); color: var(--rp-accent-contrast); }
.rp-cal-selected:hover { background: var(--rp-accent); }
.rp-cal-today { box-shadow: inset 0 0 0 2px var(--rp-accent); opacity: 1; }
.rp-cal-day:focus-visible { outline: 2px solid var(--rp-accent); outline-offset: 2px; }
.rp-day { margin: 0 0 1rem; }
.rp-day h4 { margin-bottom: 0.4rem; }
.rp-times { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rp-time { min-width: 4.5rem; min-height: 44px; padding: 0.4rem 0.75rem; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); background: transparent; color: inherit; font: inherit; cursor: pointer; font-variant-numeric: tabular-nums; }
.rp-time[aria-pressed="true"] { background: var(--rp-accent); border-color: var(--rp-accent); color: var(--rp-accent-contrast); font-weight: 600; }

/* Resumen de la cita */
.rp-summary-card { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--rp-border); border-radius: 16px; }
.rp-summary-when { margin: 0 0 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rp-soft); font-size: 1.1em; font-weight: 600; }
.rp-summary-list { list-style: none; margin: 0 0 0.75rem; padding: 0 0 0.75rem; border-bottom: 1px solid var(--rp-soft); }
.rp-summary-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.3rem 0; }
.rp-summary-list .rp-icon { width: 28px; height: 28px; color: var(--rp-accent); }
.rp-summary-price { margin-left: auto; font-variant-numeric: tabular-nums; }
.rp-summary-totals { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; margin: 0; }
.rp-summary-totals dd { margin: 0; text-align: right; }
.rp-btn-icon { min-width: 44px; padding: 0.5rem; }
.rp-btn-icon .rp-icon { width: 22px; height: 22px; }
.rp-done h3 .rp-icon { width: 1.3em; height: 1.3em; }

/* Resumen (otras pantallas) */
.rp-summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0 0 1.25rem; padding: 1rem; background: var(--rp-soft); border-radius: var(--rp-radius); }
.rp-summary dt { font-weight: 600; }
.rp-summary dd { margin: 0; }
.rp-summary ul { margin: 0; padding-left: 1.1rem; }
.rp-total { font-weight: 700; font-size: 1.1em; }
@media (max-width: 520px) { .rp-summary { grid-template-columns: 1fr; } }

/* Formularios */
.rp-form { display: grid; gap: 0.9rem; }
.rp-field { display: flex; flex-direction: column; gap: 0.25rem; }
.rp-field label { font-weight: 600; }
.rp-field input[type="text"], .rp-field input[type="email"], .rp-field input[type="tel"], .rp-field input[type="password"],
.rp-field input[type="date"], .rp-field select, .rp-field textarea {
  width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); background: transparent; color: inherit; font: inherit;
}
.rp-field [aria-invalid="true"] { border-color: var(--rp-danger); border-width: 2px; }
.rp-field-error { margin: 0; color: var(--rp-danger); font-size: 0.9em; }
.rp-field[hidden] { display: none; }
.rp-erasure { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rp-border, rgba(0,0,0,.12)); }
.rp-btn-danger { color: #b3261e; border-color: #b3261e; }
.rp-check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem; }
.rp-check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex: none; }
.rp-check label { font-weight: 400; flex: 1 1 0; min-width: 0; }
.rp-check .rp-privacy-basics { flex-basis: 100%; margin: 0; padding-left: 1.85rem; }

/* Botones */
.rp-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.rp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.5rem 1.1rem; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); background: transparent; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.rp-btn-primary { background: var(--rp-accent); border-color: var(--rp-accent); color: var(--rp-accent-contrast); font-weight: 600; }
.rp-btn-danger { border-color: var(--rp-danger); color: var(--rp-danger); }
.rp-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.rp-link { background: none; border: 0; padding: 0; color: var(--rp-accent); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
.rp-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.rp-tab { flex: 1; min-height: 44px; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.rp-tab[aria-pressed="true"] { background: var(--rp-accent); border-color: var(--rp-accent); color: var(--rp-accent-contrast); font-weight: 600; }

.rp-app :focus-visible { outline: 3px solid var(--rp-accent); outline-offset: 2px; }

/* Avisos */
.rp-alert { margin: 0.75rem 0; padding: 0.75rem 1rem; border-radius: var(--rp-radius); border: 1px solid var(--rp-border); }
.rp-alert p { margin: 0; }
.rp-alert ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.rp-alert-error { border-color: var(--rp-danger); color: var(--rp-danger); }
.rp-alert-success { border-color: var(--rp-success); color: var(--rp-success); }
.rp-loading { opacity: 0.7; }
.rp-notice { padding: 0.75rem 1rem; border: 1px dashed var(--wp--preset--color--contrast, #666); }

/* Mis citas */
.rp-card { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); }
.rp-card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: center; }
.rp-card ul { margin: 0.4rem 0; padding-left: 1.1rem; }
.rp-card.rp-status-cancelled, .rp-card.rp-status-no_show { opacity: 0.75; }
.rp-badge { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--rp-soft); font-size: 0.85em; font-weight: 600; }
.rp-confirm { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rp-border); }
.rp-done { padding: 1.25rem; border: 2px solid var(--rp-success); border-radius: var(--rp-radius); }
.rp-done h3 { margin-top: 0; color: var(--rp-success); }

@media (prefers-reduced-motion: reduce) { .rp-app * { transition: none !important; animation: none !important; } }

/* Redes sociales del negocio ([reservas_redes] u opción «Redes sociales bajo los formularios») */
.rp-social { --rp-accent: var(--wp--preset--color--primary, #1d4ed8); max-width: 760px; margin: 0 auto 2rem; }
.rp-social ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.rp-social a { display: inline-block; padding: 0.5rem 1rem; min-height: 44px; line-height: 1.75; border: 1px solid var(--rp-accent); border-radius: 999px; color: var(--rp-accent); text-decoration: none; font-weight: 600; }
.rp-social a:hover, .rp-social a:focus-visible { background: var(--rp-accent); color: var(--rp-accent-contrast, #fff); }
.rp-social a:focus-visible { outline: 2px solid var(--rp-accent); outline-offset: 2px; }
/* Aviso para instalar la web como app (iPhone: Compartir → Añadir a pantalla de inicio). */
.rp-install{border:1px solid var(--rp-border,#d0d0d5);border-left:4px solid var(--rp-accent,#2F6E6F);border-radius:8px;padding:12px 16px;margin:0 0 16px;background:#fff}
.rp-install-title{margin:0 0 6px;font-weight:600}
.rp-install ol{margin:0 0 8px;padding-left:1.4em}
.rp-install .rp-btn{margin:4px 12px 4px 0}
