/* ==========================================================================
   Huevos K UI System - Selector de sucursal
   ========================================================================== */
:root {
  /* Shared tokens */
  --hk-bg-0: #071311;
  --hk-bg-1: #0f1e1b;
  --hk-surface-1: rgba(17, 36, 32, 0.74);
  --hk-surface-2: rgba(255, 255, 255, 0.05);
  --hk-surface-hover: rgba(255, 255, 255, 0.11);
  --hk-surface-press: rgba(255, 255, 255, 0.09);
  --hk-line-soft: rgba(220, 240, 233, 0.18);
  --hk-line-strong: rgba(220, 240, 233, 0.28);
  --hk-text-1: #f6f8f7;
  --hk-text-2: rgba(246, 248, 247, 0.84);
  --hk-brand-1: #4cb39b;
  --hk-brand-2: #66d3b8;
  --hk-warn: #efbf61;
  --hk-error: #f06262;
  --hk-radius-md: 16px;
  --hk-radius-lg: 22px;
  --hk-shadow-1: 0 20px 54px rgba(0, 0, 0, 0.32);
  --hk-shadow-card: 0 12px 30px rgba(0, 0, 0, 0.2);
  --hk-font-sans: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --hk-font-serif: "Source Serif 4", Georgia, serif;
  --hk-space-2: 0.75rem;
  --hk-space-3: 1rem;
  --hk-space-4: 1.25rem;
  --hk-space-5: 1.75rem;
  --hk-tr-fast: 150ms ease;
  --hk-tr-base: 240ms ease;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--hk-font-sans);
  color: var(--hk-text-1);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(112% 82% at -6% -14%, rgba(121, 170, 166, 0.24), transparent 55%),
    radial-gradient(78% 62% at 100% 105%, rgba(240, 180, 95, 0.12), transparent 53%),
    linear-gradient(158deg, var(--hk-bg-0) 0%, var(--hk-bg-1) 52%, #0d2321 100%);
  padding:
    max(0.8rem, env(safe-area-inset-top))
    max(0.8rem, env(safe-area-inset-right))
    max(0.8rem, env(safe-area-inset-bottom))
    max(0.8rem, env(safe-area-inset-left));
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(34px);
  opacity: 0.16;
}

body::before {
  top: -140px;
  right: -120px;
  background: radial-gradient(circle, rgba(240, 180, 95, 0.9) 0%, rgba(240, 180, 95, 0) 70%);
}

body::after {
  bottom: -160px;
  left: -140px;
  background: radial-gradient(circle, rgba(121, 170, 166, 0.95) 0%, rgba(121, 170, 166, 0) 72%);
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(102, 211, 184, 0.72);
  outline-offset: 3px;
}

.pick-datetime {
  position: fixed;
  top: max(0.45rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(96vw, 42rem);
  text-align: center;
  font-size: clamp(0.68rem, 1.05vw, 0.88rem);
  font-weight: 600;
  line-height: 1.25;
  padding: 0.3rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.36);
  color: var(--hk-text-1);
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.pick-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.2rem, 1.8vw, 2.05rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    var(--hk-surface-1);
  border: 1px solid rgba(255, 246, 230, 0.1);
  border-radius: 26px;
  box-shadow: var(--hk-shadow-1);
  backdrop-filter: blur(7px);
  min-width: 0;
}

.pick-header {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.pick-status {
  margin: 0 0 0.8rem;
  padding: 0.56rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(220, 240, 233, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(246, 248, 247, 0.9);
  font-size: 0.84rem;
}

.pick-eyebrow {
  margin: 0 0 var(--hk-space-3);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hk-brand-2);
  text-shadow: 0 0 18px rgba(102, 211, 184, 0.2);
}

.pick-logo {
  display: block;
  max-width: min(260px, 82vw);
  height: auto;
  margin: 0 0 calc(var(--hk-space-3) - 0.1rem);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.3));
}

.pick-lead {
  margin: 0 0 1.45rem;
  font-size: clamp(0.99rem, 1.35vw, 1.12rem);
  line-height: 1.6;
  color: var(--hk-text-2);
  max-width: 52rem;
}

.pick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hk-space-3);
  min-width: 0;
}

@media (min-width: 560px) {
  .pick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.05rem;
  }
}

@media (min-width: 1024px) {
  .pick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

a.pick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 182px;
  position: relative;
  overflow: hidden;
  padding: 1rem 1.04rem 0.92rem;
  border-radius: var(--hk-radius-lg);
  border: 1px solid var(--hk-line-soft);
  background:
    linear-gradient(160deg, var(--hk-surface-2) 0%, rgba(255, 255, 255, 0.03) 100%),
    rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--hk-shadow-card);
  transition: transform var(--hk-tr-base), background var(--hk-tr-base), border-color var(--hk-tr-base), box-shadow var(--hk-tr-base);
  min-width: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(102, 211, 184, 0.2);
}

a.pick-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(76, 179, 155, 0.92), rgba(239, 191, 97, 0.78));
  opacity: 0.55;
}

a.pick-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(239, 191, 97, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity var(--hk-tr-base);
  pointer-events: none;
}

a.pick-card:hover {
  transform: translateY(-3px);
  border-color: var(--hk-line-strong);
  background: var(--hk-surface-hover);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.23);
}

a.pick-card:hover::after {
  opacity: 1;
}

a.pick-card:focus-visible {
  outline: 2px solid rgba(239, 191, 97, 0.9);
  outline-offset: 3px;
}

a.pick-card:active {
  transform: translateY(0);
  background: var(--hk-surface-press);
}

.pick-card-name {
  margin: 0 0 0.5rem;
  font-family: var(--hk-font-serif);
  font-weight: 700;
  font-size: clamp(1.12rem, 1.28vw, 1.3rem);
  line-height: 1.24;
  color: var(--hk-text-1);
  overflow-wrap: anywhere;
}

.pick-badge {
  display: inline-block;
  margin-bottom: 0.62rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.pick-badge.m {
  background: rgba(239, 191, 97, 0.2);
  color: #ffe1ad;
  border-color: rgba(239, 191, 97, 0.42);
}

.pick-badge.n {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 246, 228, 0.9);
  border-color: rgba(255, 245, 223, 0.22);
}

.pick-card-url {
  width: 100%;
  margin-top: auto;
  padding-top: 0.68rem;
  border-top: 1px solid rgba(255, 248, 230, 0.14);
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.73rem;
  line-height: 1.4;
  color: rgba(251, 246, 234, 0.78);
}

.pick-err {
  padding: 0.9rem 1rem;
  border-radius: var(--hk-radius-md);
  border: 1px solid rgba(240, 98, 98, 0.48);
  background: rgba(240, 98, 98, 0.16);
  color: #ffe5e1;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.pick-footer {
  margin-top: 2rem;
  padding-top: 1.18rem;
  border-top: 1px solid rgba(255, 248, 230, 0.14);
  display: grid;
  gap: 0.32rem;
  font-size: 0.9rem;
  color: rgba(251, 246, 234, 0.8);
  overflow-wrap: anywhere;
}

.pick-footer-line {
  margin: 0;
}

.pick-footer a {
  color: var(--hk-warn);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 191, 97, 0.3);
}

.pick-footer a:hover {
  border-bottom-color: var(--hk-warn);
}

.pick-footer a:active {
  opacity: 0.85;
}

.pick-footer a:focus-visible {
  outline: 2px solid rgba(239, 191, 97, 0.68);
  outline-offset: 2px;
  border-radius: 4px;
}

.pick-footer strong {
  color: rgba(251, 246, 234, 0.88);
  font-weight: 600;
}

@media (max-width: 640px) {
  .pick-shell {
    border-radius: 20px;
    padding: 1.1rem;
  }

  a.pick-card {
    min-height: 148px;
  }

  .pick-footer {
    margin-top: 1.6rem;
  }
}

@media (max-width: 420px) {
  .pick-shell {
    border-radius: 16px;
    padding: 0.92rem;
  }

  .pick-lead {
    font-size: 0.95rem;
  }

  .pick-card-name {
    font-size: 1.05rem;
  }

  .pick-datetime {
    max-width: 92vw;
    font-size: 0.72rem;
  }
}

@media (orientation: portrait) and (min-width: 700px) {
  .pick-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1700px) {
  .pick-shell {
    max-width: 1480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (hover: none) {
  a.pick-card:hover {
    transform: none;
    box-shadow: var(--hk-shadow-card);
  }
}

@supports not (height: 100dvh) {
  body {
    min-height: 100vh;
  }
}
