/* ============================================
   NEXA PHOTOBOOTH — App Base Styles
   ============================================ */

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

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s7);
}
@media (max-width: 1023px) { .container { padding: 0 var(--s5); } }
@media (max-width: 767px)  { .container { padding: 0 var(--s3); } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 48px; padding: 0 28px;
  border-radius: var(--r-pill); font-size: 15px; font-weight: 600;
  font-family: var(--font); border: none; cursor: pointer;
  transition: all var(--t); white-space: nowrap; text-decoration: none;
}
.btn-primary {
  background: var(--brand); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover  { background: var(--brand-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-primary:active { background: var(--brand-active); transform: translateY(0); }
.btn-primary:disabled { background: var(--taupe); box-shadow: none; cursor: not-allowed; opacity: 0.6; transform: none; }

.btn-secondary {
  background: transparent; color: var(--dark);
  border: 2px solid var(--dark);
}
.btn-secondary:hover  { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }
.btn-secondary:active { background: rgba(206,123,103,0.18); }
.btn-secondary:disabled { border-color: var(--tan); color: var(--tan); cursor: not-allowed; }

.btn-ghost {
  background: transparent; color: var(--brand); border: none; padding: 0 16px;
}
.btn-ghost:hover { background: var(--brand-pale); }

.btn-icon {
  width: 48px; height: 48px; padding: 0;
  border-radius: var(--r-pill); background: var(--white);
  color: var(--dark); border: 2px solid var(--border);
}
.btn-icon:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

.btn-sm  { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-lg  { height: 56px; padding: 0 36px; font-size: 16px; }
.btn-xl  { height: 64px; padding: 0 44px; font-size: 17px; }
.btn-full { width: 100%; }

/* ── Cards ── */
.card {
  background: var(--white); border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: var(--s5);
  transition: all var(--t);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
.card-elevated { box-shadow: var(--shadow-sm); border-color: transparent; }
.card-elevated:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Form ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; color: var(--dark-gray); }
.form-input, .form-select, .form-textarea {
  width: 100%; height: 48px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--white); color: var(--dark);
  font-size: 15px; font-family: var(--font);
  transition: all var(--t); outline: none;
}
.form-textarea { height: auto; padding: 14px 16px; resize: vertical; min-height: 100px; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--tan); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(206,123,103,0.12);
}
.form-input.error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(192,57,43,0.10); }
.form-hint  { font-size: 12px; color: var(--dusty); }
.form-error { font-size: 12px; color: var(--error); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 14px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-primary { background: var(--brand); color: var(--white); }
.badge-soft    { background: var(--brand-pale); color: var(--brand); border: 1px solid rgba(206,123,103,0.25); }
.badge-success { background: #ECFDF5; color: var(--success); border: 1px solid rgba(45,122,79,0.2); }
.badge-warning { background: #FFFBEB; color: var(--warning); border: 1px solid rgba(213,161,31,0.2); }

/* ── Section ── */
.section    { padding: var(--s12) 0; }
.section-sm { padding: var(--s8) 0; }
.section-hdr { text-align: center; max-width: 600px; margin: 0 auto var(--s8); }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; color: var(--near-black); line-height: 1.2; margin-bottom: 12px; }
.section-sub   { font-size: 16px; color: var(--dusty); line-height: 1.7; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--r-md);
  background: var(--dark); color: var(--white);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); min-width: 280px;
  animation: slideUp 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
.toast.warning { background: var(--warning); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Overlay / Modal ── */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(42,21,12,0.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s5); opacity: 0; pointer-events: none;
  transition: opacity var(--t-slow);
}
.overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--r-xl);
  padding: var(--s7); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px); transition: transform var(--t-slow);
}
.overlay.active .modal { transform: translateY(0); }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ── */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-1 { gap: 8px; }  .gap-2 { gap: 12px; } .gap-3 { gap: 16px; }
.gap-4 { gap: 24px; } .gap-5 { gap: 32px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-brand  { color: var(--brand); }
.text-muted  { color: var(--dusty); }
.text-white  { color: var(--white); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 767px) {
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: unset; }
  .modal { padding: var(--s5); }
  .btn-lg { height: 52px; }
}
