/* Casas En Rocha · base compartida por la web pública y el panel: tokens, campos y botones. */
:root {
  /* Colores */
  --mar: #0f4c5c;
  --mar-claro: #1f6f80;
  --mar-tenue: rgb(15 76 92 / 8%);
  --arena: #f6f1e7;
  --arena-oscura: #e9dfcc;
  --sol: #e9a23b;
  --tinta: #1f2a30;
  --tenue: #5f6c73;
  --borde: #ddd4c3;
  --borde-fuerte: #b9ae99;
  --blanco: #fffdf9;
  --rojo: #b3382c;
  --rojo-fondo: #fbe9e6;
  --verde: #2f7d4f;
  --verde-oscuro: #17613a;
  --verde-fondo: #e6f3ea;
  --wa: #1fa855;
  /* Espacios */
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 24px;
  --e-6: 32px;
  --e-7: 48px;
  --e-8: 64px;
  /* Radios */
  --radio-chico: 8px;
  --radio-medio: 10px;
  --radio: 14px;
  --radio-pastilla: 999px;
  /* Sombras */
  --sombra-suave: 0 1px 3px rgb(31 42 48 / 8%);
  --sombra: 0 1px 2px rgb(31 42 48 / 6%), 0 6px 24px rgb(31 42 48 / 8%);
  --sombra-alta: 0 8px 32px rgb(31 42 48 / 18%);
  /* Tipografía y controles */
  --fuente: Inter, system-ui, sans-serif;
  --fuente-titulos: Fraunces, Georgia, serif;
  --alto-control: 44px;
  color-scheme: light;
}
* { box-sizing: border-box; }

/* Campos: siempre el mismo alto, borde y foco. */
:where(input:not([type='checkbox'], [type='radio'], [type='file'], [type='range'], [type='color']), select, textarea) {
  width: 100%;
  min-height: var(--alto-control);
  padding: 10px var(--e-3);
  border: 1px solid var(--borde);
  border-radius: var(--radio-medio);
  background: #fff;
  color: var(--tinta);
  font: inherit;
}
:where(textarea) { min-height: 96px; resize: vertical; }
:where(input, select, textarea):disabled { background: var(--arena); color: var(--tenue); cursor: not-allowed; }
:where(input, select, textarea):user-invalid { border-color: var(--rojo); }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--mar-claro); outline-offset: 2px; }

/* Casillas y opciones */
:where(input[type='checkbox'], input[type='radio']) {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--borde-fuerte);
  border-radius: 5px;
  background: #fff center / 14px no-repeat;
  vertical-align: middle;
  cursor: pointer;
}
:where(input[type='radio']) { border-radius: 50%; }
:where(input[type='checkbox'], input[type='radio']):hover:not(:disabled) { border-color: var(--mar); }
:where(input[type='checkbox']):checked {
  border-color: var(--mar);
  background-color: var(--mar);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:where(input[type='radio']):checked { border: 6px solid var(--mar); }
:where(input[type='checkbox'], input[type='radio']):disabled { opacity: 0.5; cursor: not-allowed; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 32px; padding-block: var(--e-1); color: var(--tinta); font-size: 0.95rem; font-weight: 400; line-height: 1.4; cursor: pointer; }
.check input { margin-top: 1px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--e-1) var(--e-4); margin: 0; padding: 0; border: 0; }

/* Interruptor, para lo que se prende o se apaga */
.switch { display: flex; align-items: center; gap: var(--e-3); min-height: var(--alto-control); color: var(--tinta); font-weight: 500; line-height: 1.35; cursor: pointer; }
.switch input, input.switch-solo { position: relative; width: 44px; height: 26px; border: 0; border-radius: var(--radio-pastilla); background: var(--borde-fuerte); background-image: none; transition: background-color 0.15s; }
.switch input::before, input.switch-solo::before { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sombra-suave); transition: transform 0.15s; }
.switch input:checked, input.switch-solo:checked { border: 0; background: var(--mar); background-image: none; }
.switch input:checked::before, input.switch-solo:checked::before { transform: translateX(18px); }

/* Botones: primario, secundario y terciario */
:where(button, .boton) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: var(--alto-control);
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radio-medio);
  background: var(--mar);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
:where(button, .boton):hover { background: var(--mar-claro); }
.boton { color: #fff; }
:where(button, .boton):disabled { opacity: 0.55; cursor: not-allowed; }
.boton-secundario, button.boton-secundario { border-color: var(--mar); background: transparent; color: var(--mar); }
.boton-secundario:hover, button.boton-secundario:hover { background: var(--mar-tenue); }
.boton-terciario, button.boton-terciario { background: transparent; color: var(--mar); }
.boton-terciario:hover, button.boton-terciario:hover { background: var(--mar-tenue); }
.enlace, button.enlace { padding: 0; min-height: 0; border: 0; background: none; color: var(--mar); font-weight: 500; text-decoration: underline; }
.enlace:hover, button.enlace:hover { background: none; }

/* Íconos del set: el azul del logo, con el naranja del sol como acento. */
.icono { flex: none; color: var(--mar); vertical-align: -0.2em; }
.icono-acento { stroke: var(--sol); }
