/* ============================================================================
   Bita Express · Components
   Botones, cards, badges, inputs, navegación
   ============================================================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0 var(--space-5);
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  will-change: transform;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard),
    color var(--motion-base) var(--ease-standard);
}

.btn:hover { text-decoration: none; }

.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn .btn__arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--motion-base) cubic-bezier(0.23, 1, 0.32, 1);
  transform: translateX(0);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--brand-primary);
  color: var(--on-brand-primary);
}

.btn--primary:hover {
  background: var(--brand-primary-hover);
}

.btn--primary:active {
  background: var(--brand-primary-pressed);
  transform: scale(0.97);
}

.btn--secondary {
  background: var(--brand-secondary);
  color: var(--on-brand-secondary);
}

.btn--secondary:hover { background: var(--brand-secondary-hover); }
.btn--secondary:active {
  background: var(--brand-secondary-pressed);
  transform: scale(0.97);
}

.btn--outline {
  background: transparent;
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

.btn--outline:hover {
  background: var(--brand-secondary-soft);
}

.btn--outline:active {
  transform: scale(0.97);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-secondary);
  border-color: transparent;
  padding: 0 var(--space-3);
}

.btn--ghost:hover { background: var(--brand-secondary-soft); }
.btn--ghost:active { transform: scale(0.97); }

.section--dark .btn--ghost,
.section--wine .btn--ghost {
  color: var(--text-inverse);
}

.section--dark .btn--ghost:hover,
.section--wine .btn--ghost:hover {
  background: rgba(246, 250, 251, 0.08);
}

/* Botón sobre fondo oscuro */
.section--dark .btn--outline,
.section--wine .btn--outline {
  color: var(--text-inverse);
  border-color: var(--text-inverse);
}

.section--dark .btn--outline:hover,
.section--wine .btn--outline:hover {
  background: rgba(246, 250, 251, 0.1);
}

/* Sizes */
.btn--compact { height: 44px; padding: 0 var(--space-4); font-size: 0.875rem; }
.btn--large { height: 56px; padding: 0 var(--space-6); font-size: 1.125rem; }

.btn--block { width: 100%; }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn--primary:disabled:hover { background: var(--brand-primary); }
.btn--secondary:disabled:hover { background: var(--brand-secondary); }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--label-md);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.badge--en-ruta { background: var(--semantic-active-soft); color: var(--text-primary); }
.badge--en-ruta .badge__dot { background: var(--brand-primary); }

.badge--entregado { background: var(--semantic-success-soft); color: var(--semantic-success); }
.badge--entregado .badge__dot { background: var(--semantic-success); }

.badge--pendiente { background: var(--semantic-warning-soft); color: var(--text-primary); }
.badge--pendiente .badge__dot { background: var(--brand-accent-hover); }

.badge--info { background: var(--semantic-info-soft); color: var(--brand-secondary); }
.badge--info .badge__dot { background: var(--brand-secondary); }

.badge--neutral { background: var(--surface-subtle); color: var(--text-primary); }
.badge--neutral .badge__dot { background: var(--text-muted); }

/* ---- Cards ---- */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition:
    border-color var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-standard);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  border-color: var(--brand-secondary);
  transform: translateY(-2px);
}

.card--interactive:focus-within {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--brand-secondary-soft);
  display: grid;
  place-items: center;
  color: var(--brand-secondary);
  flex-shrink: 0;
}

.card__icon svg {
  width: 28px;
  height: 28px;
}

.card__icon--orange {
  background: rgba(254, 101, 2, 0.12);
  color: var(--brand-primary);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--heading-h4);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-primary);
  margin: 0;
}

.card__body {
  color: var(--text-secondary);
  font-size: var(--body-md);
  margin: 0;
}

.card__meta {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* Card en sección oscura */
.section--dark .card,
.section--wine .card {
  background: var(--surface-inverse-raised);
  border-color: var(--border-inverse);
  color: var(--text-inverse);
}

.section--dark .card__title,
.section--wine .card__title {
  color: var(--text-inverse);
}

.section--dark .card__body,
.section--wine .card__body {
  color: var(--text-inverse-muted);
}

.section--dark .card__meta,
.section--wine .card__meta {
  border-top-color: var(--border-inverse);
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  height: 52px;
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  transition: border-color var(--motion-base) var(--ease-standard);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus-visible {
  outline: none;
  border-color: var(--brand-secondary);
  box-shadow: var(--shadow-focus);
}

/* ---- Pills / Tags ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: var(--brand-primary);
  color: var(--on-brand-primary);
}

.pill--wine { background: var(--brand-secondary); color: var(--on-brand-secondary); }
.pill--ink { background: var(--surface-inverse); color: var(--text-inverse); }
.pill--ghost { background: transparent; color: var(--brand-secondary); border: 1px solid var(--brand-secondary); }
.pill--bone { background: var(--neutral-50); color: var(--text-primary); border: 1px solid var(--border-subtle); }

/* ---- Stats ---- */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--brand-primary-ink);
  line-height: 1;
  font-variation-settings: "wdth" 88;
}

.section--dark .stat__value,
.section--wine .stat__value {
  color: var(--brand-accent);
}

.stat__label {
  font-family: var(--font-mono);
  font-size: var(--label-md);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.section--dark .stat__label,
.section--wine .stat__label {
  color: var(--text-inverse-muted);
}

/* ---- Disclosure / FAQ ---- */
.disclosure {
  border-top: 1px solid var(--border-subtle);
}

.disclosure:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--heading-h4);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-primary);
  transition: color var(--motion-base) var(--ease-standard);
}

.disclosure__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.disclosure__summary::-webkit-details-marker { display: none; }

.disclosure__summary:hover {
  color: var(--brand-secondary);
}

.disclosure__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--brand-secondary-soft);
  color: var(--brand-secondary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform var(--motion-base) cubic-bezier(0.23, 1, 0.32, 1);
}

.disclosure[open] .disclosure__icon {
  transform: rotate(45deg) scale(0.7);
  background: var(--brand-secondary);
  color: var(--on-brand-secondary);
}

.disclosure__body {
  padding: 0 0 var(--space-6);
  color: var(--text-secondary);
  max-width: 60ch;
}

.section--dark .disclosure,
.section--wine .disclosure {
  border-top-color: var(--border-inverse);
}

.section--dark .disclosure__summary,
.section--wine .disclosure__summary {
  color: var(--text-inverse);
}

.section--dark .disclosure:last-child,
.section--wine .disclosure:last-child {
  border-bottom-color: var(--border-inverse);
}

.section--dark .disclosure__body,
.section--wine .disclosure__body {
  color: var(--text-inverse-muted);
}

/* ---- List item ---- */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--body-md);
  line-height: 1.55;
}

.list-item__bullet {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
}

.list-item__bullet::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--on-brand-primary);
}

.section--dark .list-item__bullet,
.section--wine .list-item__bullet {
  background: var(--brand-accent);
}

.section--dark .list-item__bullet::after,
.section--wine .list-item__bullet::after {
  background: var(--on-brand-accent);
}
