/* Referral call funnel (D31 §4.4) -- and the /llamada/<token> manage page,
   which links this same sheet.

   The `--e4k-*` token block is the demo page's, repeated rather than imported:
   demo-booking.css also carries that page's whole layout, and linking it here
   would drag in a two-column booking shell, a quiz stack and a slot grid this
   page does not have. The tokens are the brand contract; the layout below is
   this page's own. Keep the token values in step with demo-booking.css. */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --e4k-orange: #dd8a03;
  --e4k-orange-deep: #db6015;
  --e4k-orange-50: #fdf4e3;
  --e4k-orange-100: #fadfa8;
  --e4k-orange-200: #f5bf66;
  --e4k-navy: #12284c;
  --e4k-navy-50: #eaeef5;
  --e4k-navy-100: #c5cedf;
  --e4k-navy-400: #23406f;
  --e4k-green: #76bc21;
  --e4k-teal: #0099a8;
  --e4k-white: #ffffff;
  --e4k-gray-50: #f7f7f8;
  --e4k-gray-100: #eeeef1;
  --e4k-gray-200: #dadce2;
  --e4k-gray-300: #b7bac5;
  --e4k-gray-400: #878b9a;
  --e4k-gray-500: #5a5e6b;
  --ink: var(--e4k-navy);
  --muted: var(--e4k-gray-500);
  --line: var(--e4k-gray-200);
  --soft: var(--e4k-gray-50);
  --accent: var(--e4k-orange-deep);
  --accent-soft: var(--e4k-orange-50);
  --font-sans: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --radius: 18px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(18, 40, 76, 0.08);
  --shadow-md: 0 4px 12px rgba(18, 40, 76, 0.1);
  --shadow-lg: 0 22px 60px -18px rgba(18, 40, 76, 0.28);
  --shadow-orange: 0 10px 24px -8px rgba(219, 96, 21, 0.35);
}

* {
  box-sizing: border-box;
}

.hidden,
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--e4k-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
p {
  margin-top: 0;
}

/* Mobile-first: one column, full width, the aside last. The two-column layout
   only appears once there is room for it. */
.call-shell {
  width: min(690px, calc(100vw - 24px));
  margin: 0 auto;
  padding: clamp(18px, 4vh, 42px) 0 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.call-main {
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-logo {
  height: 38px;
  width: auto;
}

.brand-mark {
  display: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--e4k-navy);
}

.brand-row h1 {
  font-size: clamp(20px, 5.2vw, 26px);
  line-height: 1.2;
  margin-bottom: 4px;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.referral-badge {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #f1f9e8;
  border: 1px solid var(--e4k-green);
  color: #3d6b0f;
  font-weight: 600;
  font-size: 14px;
}

.step-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--e4k-gray-200);
}

.step-dot.done {
  background: var(--accent);
}

.step-card {
  display: none;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--e4k-white);
}

.step-card.active {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--e4k-gray-400);
}

.step-card h2 {
  font-size: clamp(17px, 4.4vw, 21px);
  line-height: 1.3;
  margin-bottom: 16px;
}

.single-field,
.phone-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--e4k-navy-400);
}

.single-field + .single-field {
  margin-top: 16px;
}

.field-note {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--e4k-white);
  color: var(--ink);
  font-weight: 500;
}

input:focus,
select:focus {
  outline: 2px solid var(--e4k-orange-200);
  outline-offset: 1px;
  border-color: var(--accent);
}

.phone-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.phone-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.phone-warning {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--e4k-orange-200);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.quiz-warning-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
}

.quiz-warning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.step-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.primary-button,
.secondary-button {
  flex: 1;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
}

.primary-button {
  background: var(--accent);
  color: var(--e4k-white);
  box-shadow: var(--shadow-orange);
}

.primary-button:disabled {
  background: var(--e4k-gray-300);
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  background: var(--e4k-white);
  border-color: var(--line);
  color: var(--e4k-navy-400);
}

.step-consent {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Sits directly under the step's heading, above the field it explains --
   heavier than .step-consent, which closes the step out at the bottom. */
.step-help {
  margin: -6px 0 18px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* --- Slot picker ---------------------------------------------------------- */

.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.day-tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--e4k-white);
  color: var(--e4k-navy-400);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.day-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  min-height: 48px;
}

.slot-button {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--e4k-white);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.slot-button.active {
  border-color: var(--e4k-green);
  background: #f1f9e8;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 16px 0;
  color: var(--muted);
  font-size: 14px;
}

.timezone-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--e4k-navy-400);
}

.form-message {
  margin: 14px 0 0;
  min-height: 18px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* --- Confirmation --------------------------------------------------------- */

.confirmation {
  padding: 22px 18px;
  border: 1px solid var(--e4k-green);
  border-radius: var(--radius);
  background: #f7fcf1;
  box-shadow: var(--shadow-sm);
}

.confirmation h2 {
  font-size: clamp(18px, 4.6vw, 22px);
  margin-bottom: 12px;
}

.confirmation-when {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.confirmation-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--e4k-white);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.confirmation-note-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--e4k-green);
}

.manage-link {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
}

/* --- Manage page (llamada-gestionar.html) --------------------------------- */

.manage-card {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--e4k-white);
}

.manage-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--e4k-gray-100);
  color: var(--e4k-navy-400);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.manage-status.scheduled {
  background: #f1f9e8;
  color: #3d6b0f;
}

.manage-status.canceled {
  background: var(--e4k-orange-50);
  color: var(--accent);
}

/* --- Sidebar -------------------------------------------------------------- */

.call-side {
  min-width: 0;
}

.side-details {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--soft);
  border: 1px solid var(--line);
}

.side-details h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 14px;
}

.side-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.side-meta-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--e4k-navy-100);
}

.side-meta-clock {
  background: var(--e4k-teal);
}

.side-meta-phone {
  background: var(--e4k-green);
}

.side-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.side-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--e4k-navy-400);
}

@media (min-width: 560px) {
  .phone-grid {
    grid-template-columns: minmax(140px, 0.7fr) 1fr;
  }

  .step-actions {
    justify-content: flex-end;
  }

  .primary-button,
  .secondary-button {
    flex: 0 0 auto;
    min-width: 150px;
  }
}

@media (min-width: 900px) {
  .call-shell {
    width: min(1000px, calc(100vw - 40px));
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }

  .call-main {
    flex: 1 1 auto;
  }

  .call-side {
    flex: 0 0 280px;
    position: sticky;
    top: 32px;
  }
}

.name-warning {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--e4k-orange-200);
  border-radius: 10px;
  background: var(--e4k-orange-50);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.name-warning[hidden] {
  display: none;
}
