/* Drift User Guide — shared styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: linear-gradient(135deg, #fef7ed 0%, #fafaf9 50%, #fef3c7 100%);
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-faint: #a8a29e;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --border: #f5f5f4;
  --border-accent: #fed7aa;
  --highlight-bg: #fef7ed;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text);
}

.container { max-width: 720px; width: 100%; }

/* ── Header ───────────────────────────────────────── */

.header { text-align: center; margin-bottom: 32px; }

.logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(212, 85, 58, 0.3);
  object-fit: cover;
}

h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.header-sub { font-size: 15px; color: var(--text-muted); }

/* ── Language toggle ──────────────────────────────── */

.lang-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-top: 16px;
}

.lang-btn {
  padding: 6px 16px; font-size: 13px; font-weight: 600;
  border: 1px solid #d6d3d1; background: white;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; line-height: 1.4;
}
.lang-btn:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.lang-btn:last-child  { border-radius: 0 8px 8px 0; }
.lang-btn.active { background: var(--text); color: white; border-color: var(--text); }
.lang-btn:not(.active):hover { background: #f5f5f4; }

/* ── Language visibility ──────────────────────────── */

.container [lang="en"] { display: none; }
.container [lang="es"] { display: block; }
.container span[lang="es"],
.container strong[lang="es"],
.container a[lang="es"]    { display: inline; }
.container span[lang="en"],
.container strong[lang="en"],
.container a[lang="en"]    { display: none; }
.container li[lang="es"]   { display: list-item; }
.container li[lang="en"]   { display: none; }
.container .steps li[lang="es"] { display: flex; }
.container .steps li[lang="en"] { display: none; }

body.lang-en .container [lang="en"] { display: block; }
body.lang-en .container [lang="es"] { display: none; }
body.lang-en .container span[lang="en"],
body.lang-en .container strong[lang="en"],
body.lang-en .container a[lang="en"]    { display: inline; }
body.lang-en .container span[lang="es"],
body.lang-en .container strong[lang="es"],
body.lang-en .container a[lang="es"]    { display: none; }
body.lang-en .container li[lang="en"]   { display: list-item; }
body.lang-en .container li[lang="es"]   { display: none; }
body.lang-en .container .steps li[lang="en"] { display: flex; }
body.lang-en .container .steps li[lang="es"] { display: none; }

/* ── Breadcrumb ───────────────────────────────────── */

.breadcrumb {
  text-align: center; margin-bottom: 12px; font-size: 13px; color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Cards ────────────────────────────────────────── */

.card {
  background: var(--card-bg); border-radius: 20px;
  padding: 32px; box-shadow: var(--card-shadow); margin-bottom: 20px;
}
.card h2 {
  font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.card h3 {
  font-size: 16px; font-weight: 700; color: var(--text); margin: 20px 0 8px;
}
.card h3:first-child { margin-top: 0; }
.card p {
  font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px;
}
.card p:last-child { margin-bottom: 0; }
.card ul { padding-left: 20px; margin-bottom: 12px; }
.card ul:last-child { margin-bottom: 0; }
.card li {
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 4px; display: list-item;
}

/* ── Hub link cards ───────────────────────────────── */

.hub-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card-bg); border-radius: 20px;
  padding: 28px 32px; box-shadow: var(--card-shadow); margin-bottom: 16px;
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hub-card:hover {
  border-color: var(--accent); box-shadow: 0 6px 32px rgba(194, 65, 12, 0.12);
}
.hub-card .hub-icon {
  font-size: 28px; margin-bottom: 12px; display: block;
}
.hub-card .hub-title {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.hub-card .hub-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
}

/* ── Tip / callout boxes ──────────────────────────── */

.tip {
  background: var(--highlight-bg); border: 1px solid var(--border-accent);
  border-radius: 12px; padding: 16px 20px; margin: 16px 0;
  font-size: 14px; color: var(--accent-hover); line-height: 1.6;
}
.tip strong { color: var(--accent); }

/* ── Steps ────────────────────────────────────────── */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 12px 0; }
.steps li {
  counter-increment: step;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* ── Data table ───────────────────────────────────── */

.data-table {
  width: 100%; border-collapse: collapse; margin: 12px 0;
  font-size: 14px;
}
.data-table th {
  text-align: left; font-weight: 600; color: var(--text);
  padding: 10px 12px; border-bottom: 2px solid #e7e5e4;
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); line-height: 1.5;
}

/* ── Phone mockup ─────────────────────────────────── */

.mock-row {
  display: flex; gap: 24px; justify-content: center;
  flex-wrap: wrap; margin: 20px 0;
}

.mock-figure {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mock-caption {
  font-size: 12px; color: var(--text-muted); font-style: italic; text-align: center;
  max-width: 240px;
}

.mock-screenshot {
  width: 220px;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 3px solid #292524;
}

.phone {
  width: 200px; height: 400px;
  border: 3px solid #292524; border-radius: 28px;
  background: #f5f5f4; overflow: hidden;
  position: relative; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.phone-status {
  height: 28px; background: #292524;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.phone-notch {
  width: 70px; height: 18px;
  background: #292524; border-radius: 0 0 12px 12px;
  position: absolute; top: 0;
}
.phone-time {
  font-size: 10px; color: #a8a29e; font-weight: 600;
  position: absolute; left: 14px; top: 7px;
}
.phone-icons {
  font-size: 8px; color: #a8a29e;
  position: absolute; right: 14px; top: 8px; letter-spacing: 2px;
}

.phone-body {
  display: flex; flex-direction: column; height: calc(100% - 28px);
}

/* Map area */
.phone-map {
  flex: 1;
  background: linear-gradient(160deg, #a7c4a0 0%, #d4cba4 60%, #b8c5a8 100%);
  position: relative; overflow: hidden;
}
.phone-map::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(139,160,130,0.6) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(180,170,140,0.5) 0%, transparent 40%);
}
.phone-map-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px; color: rgba(60,60,50,0.5); font-weight: 600;
  letter-spacing: 1px; z-index: 1;
}
.phone-map-marker {
  position: absolute; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
  border: 2px solid white; z-index: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.phone-map-route {
  position: absolute; z-index: 1;
  border-top: 2px dashed var(--accent); width: 60px;
  transform: rotate(-15deg);
}

/* Bottom sheet */
.phone-sheet {
  background: white; border-radius: 14px 14px 0 0;
  padding: 6px 10px 10px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.phone-handle {
  width: 32px; height: 4px; background: #d6d3d1;
  border-radius: 2px; margin: 0 auto 8px;
}
.phone-tabs {
  display: flex; gap: 4px; margin-bottom: 8px;
}
.phone-tab {
  flex: 1; text-align: center; font-size: 7px; font-weight: 600;
  padding: 4px 2px; border-radius: 6px; color: var(--text-muted);
}
.phone-tab.active { background: var(--highlight-bg); color: var(--accent); }

.phone-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid #f5f5f4;
}
.phone-row:last-child { border-bottom: none; }
.phone-thumb {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #fde68a, #fbbf24); flex-shrink: 0;
}
.phone-row-text {
  display: flex; flex-direction: column; gap: 1px;
}
.phone-row-title { font-size: 8px; font-weight: 600; color: var(--text); }
.phone-row-sub   { font-size: 7px; color: var(--text-muted); }

/* Dashboard-style phone */
.phone-dash {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px;
}
.phone-dash-card {
  background: white; border-radius: 10px;
  padding: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.phone-dash-title { font-size: 9px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.phone-dash-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 7px; color: var(--text-secondary); padding: 3px 0;
}
.phone-dash-icon {
  width: 16px; height: 16px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; flex-shrink: 0;
}
.phone-dash-btn {
  display: inline-block; padding: 4px 10px;
  background: var(--accent); color: white;
  border-radius: 6px; font-size: 7px; font-weight: 600;
  text-align: center; margin-top: 6px;
}

/* Pizarra editor phone */
.phone-editor {
  display: flex; flex-direction: column; gap: 8px; padding: 10px;
}
.phone-editor-header {
  font-size: 10px; font-weight: 700; color: var(--text); text-align: center;
}
.phone-textarea {
  border: 1px solid #d6d3d1; border-radius: 8px;
  padding: 8px; font-size: 8px; color: var(--text-secondary);
  line-height: 1.4; min-height: 50px; background: #fafaf9;
}
.phone-expiry {
  display: flex; gap: 4px;
}
.phone-expiry-opt {
  flex: 1; text-align: center; font-size: 7px; padding: 4px;
  border: 1px solid #d6d3d1; border-radius: 6px; color: var(--text-muted);
}
.phone-expiry-opt.active {
  background: var(--accent); color: white; border-color: var(--accent);
}
.phone-char-count {
  font-size: 7px; color: var(--text-muted); text-align: right;
}

/* ── Footer ───────────────────────────────────────── */

.guide-footer {
  text-align: center; font-size: 13px; color: var(--text-faint);
  padding: 8px 0 20px;
}
.guide-footer a {
  color: var(--accent); text-decoration: none;
}
.guide-footer a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 480px) {
  body { padding: 24px 16px; }
  h1 { font-size: 24px; }
  .card { padding: 24px 20px; }
  .hub-card { padding: 20px; }
  .mock-row { gap: 16px; }
  .phone { width: 170px; height: 340px; }
}
