/* Web pública: móvil primero, sin frameworks. --color-negocio viene de la configuración. */

:root {
  --color-negocio: #222222;
  --color-negocio-texto: #FFFFFF;
  --fondo: #F5F5F4;
  --superficie: #FFFFFF;
  --texto: #1C1917;
  --texto-suave: #57534E;
  --borde: #D6D3D1;
  --peligro: #B91C1C;
  --exito: #15803D;
  --aviso: #A16207;
  --radio: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #1C1917;
    --superficie: #292524;
    --texto: #F5F5F4;
    --texto-suave: #A8A29E;
    --borde: #44403C;
    --peligro: #F87171;
    --exito: #4ADE80;
    --aviso: #FACC15;
  }
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fondo);
}

a {
  color: inherit;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 .75rem;
}

/* ---- Cabecera y pie ---- */

.cabecera {
  background: var(--color-negocio);
  color: var(--color-negocio-texto);
  padding: .75rem 1rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: 40rem;
  margin: 0 auto;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.marca-logo {
  max-height: 44px;
  max-width: 120px;
  object-fit: contain;
}

.contenido {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.pie {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  font-size: .875rem;
  color: var(--texto-suave);
  border-top: 1px solid var(--borde);
}

.pie-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}

/* ---- Bloques ---- */

.paso,
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1rem;
  margin-bottom: 1rem;
}

.paso-num {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: .25rem;
  border-radius: 50%;
  background: var(--color-negocio);
  color: var(--color-negocio-texto);
  font-size: .9rem;
}

.nota {
  color: var(--texto-suave);
  font-size: .9rem;
}

.aviso {
  padding: .75rem 1rem;
  border-radius: var(--radio);
  margin-bottom: 1rem;
  border: 1px solid currentColor;
}

.aviso-exito { color: var(--exito); }
.aviso-error { color: var(--peligro); }
.aviso-aviso { color: var(--aviso); }

/* Campo trampa anti-bots: fuera de la vista, no solo oculto con display */
.trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Opciones (servicios y barberos) ---- */

.opciones {
  display: grid;
  gap: .5rem;
}

.opcion {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem;
  border: 2px solid var(--borde);
  border-radius: var(--radio);
  cursor: pointer;
}

.opcion:has(input:checked) {
  border-color: var(--color-negocio);
  box-shadow: 0 0 0 1px var(--color-negocio);
}

.opcion input {
  margin-top: .3rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-negocio);
}

.opcion-compacta {
  align-items: center;
}

.opcion-compacta input {
  margin-top: 0;
}

.opcion-texto {
  display: grid;
}

.opcion-nombre {
  font-weight: 600;
}

.detalle,
.opcion-descripcion {
  color: var(--texto-suave);
  font-size: .9rem;
}

.lista-fija {
  margin: 0 0 .5rem;
  padding-left: 1.25rem;
}

/* ---- Días y horas ---- */

.tira-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-bottom: .75rem;
}

.tira-dias {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .25rem;
}

.dia {
  display: grid;
  justify-items: center;
  padding: .4rem 0;
  border: 2px solid var(--borde);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--texto);
  font: inherit;
  cursor: pointer;
}

.dia:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.dia[aria-selected="true"],
.hora[aria-selected="true"] {
  background: var(--color-negocio);
  border-color: var(--color-negocio);
  color: var(--color-negocio-texto);
}

.dia-semana,
.dia-mes {
  font-size: .7rem;
  text-transform: uppercase;
}

.dia-num {
  font-size: 1.1rem;
  font-weight: 700;
}

.horas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: .4rem;
}

.hora {
  padding: .6rem 0;
  border: 2px solid var(--borde);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--texto);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---- Formularios ---- */

.campo {
  display: grid;
  gap: .25rem;
  margin-bottom: .9rem;
}

.campo label {
  font-weight: 600;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  color: var(--texto);
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: 10px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-negocio);
  outline-offset: 2px;
}

.casilla {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
}

.casilla input {
  margin-top: .3rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-negocio);
}

/* ---- Botones ---- */

.boton,
.btn {
  display: inline-block;
  width: 100%;
  padding: .85rem 1rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--color-negocio-texto);
  background: var(--color-negocio);
  border: 0;
  border-radius: var(--radio);
  cursor: pointer;
}

.boton:disabled {
  opacity: .6;
  cursor: wait;
}

.boton-peligro {
  background: transparent;
  color: var(--peligro);
  border: 2px solid var(--peligro);
}

.boton-sec {
  padding: .5rem .8rem;
  font: inherit;
  color: var(--texto);
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: 10px;
  cursor: pointer;
}

.boton-sec:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.acciones {
  display: grid;
  gap: .5rem;
}

.copiar {
  display: flex;
  gap: .5rem;
}

/* ---- Resumen y cita ---- */

.resumen {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem 1rem;
  margin: 0 0 1rem;
}

.resumen dt {
  color: var(--texto-suave);
}

.resumen dd {
  margin: 0;
}

.cita-cuando {
  font-size: 1.15rem;
}

.estado {
  display: inline-block;
  margin: 0 0 .5rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  border: 1px solid currentColor;
}

.estado-confirmada { color: var(--exito); }
.estado-pendiente { color: var(--aviso); }
.estado-cancelada { color: var(--peligro); }
.estado-pasada { color: var(--texto-suave); }

.legal h2,
.legal h3 {
  margin-top: 1.5rem;
}

/* ---- Portada ---- */

.portada {
  text-align: center;
  margin-bottom: 1.25rem;
}

.portada .boton {
  width: auto;
  min-width: 14rem;
}

/* ---- Páginas de error (comparten vistas con el panel) ---- */

.text-center { text-align: center; }
.py-5 { padding: 2rem 0; }
.display-1 { font-size: 3.5rem; margin: 0; }
.fw-bold { font-weight: 700; }
.h2 { font-size: 1.3rem; font-weight: 600; }
.lead { color: var(--texto-suave); }
.btn-lg { width: auto; }

@media (min-width: 40rem) {
  .acciones {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Iconos de botones (clase .icono, dibujados por publico.js) ---- */

.icono {
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
  flex-shrink: 0;
}

.boton .icono,
.boton-sec .icono {
  margin-right: .4em;
}

/* Botón solo con icono (p. ej. las flechas de los días): sin margen. */
.boton-sec .icono:only-child {
  margin-right: 0;
}

/* ---- Crédito de enCODE Desarrollos (pie) ---- */

.creado-por {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: .75rem 0 0;
  font-size: .8125rem;
}

.creado-por a {
  color: inherit;
  font-weight: 600;
}

.creado-por-logo {
  height: 1rem;
  width: auto;
}

/* Logotipo de tijerAPP junto al crédito, en una sola fila. */
.creado-por-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem 1rem;
  margin-top: .75rem;
}

.creado-por-pie .creado-por {
  margin: 0;
}

.creado-por-app {
  height: 1.75rem;
  width: auto;
}
