@import './variables.css';

/* ─────────────────────────────────────────────────────────────────────────────
   Base — reset, global elements, app shell
───────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: var(--font-family);
  cursor: pointer;
}

input, textarea {
  font-family: var(--font-family);
}

img {
  display: block;
  max-width: 100%;
}

/* ── App Shell ── */
#app {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: var(--space-2);
}

.header__logo {
  height: 28px;
  flex: 1;
}

.header__logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.header__back-btn {
  background: none;
  border: none;
  padding: var(--space-1) var(--space-2);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.header__back-btn:hover { background: var(--color-bg); }
.header__back-btn.hidden { visibility: hidden; pointer-events: none; }

/* ── Progress Bar ── */
.progress-bar {
  padding: var(--space-3) var(--space-5) var(--space-2);
  background: var(--color-white);
}

.progress-bar__track {
  display: flex;
  gap: var(--space-1);
}

.progress-bar__step {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-slow);
}

.progress-bar__step--active { background: var(--color-primary); }
.progress-bar__step--done   { background: var(--color-success); }

/* ── Sticky Footer ── */
.sticky-footer {
  padding: var(--space-4) var(--space-5);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  position: sticky;
  bottom: 0;
}
