/* BottleLore — Global Styles */

/* ── FONTS ──────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Cormorant+SC:wght@300;400;500&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

/* ── RESET ──────────────────────────────────────────────────────────────── */

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

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

/* ── THEME VARIABLES ────────────────────────────────────────────────────── */

:root {
  --transition: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.day {
  --bg:           #f5efe4;
  --bg-card:      #faf6ef;
  --text-primary: #1c1208;
  --text-winery:  #6b4c28;
  --text-body:    #3d2e1a;
  --text-muted:   #967c5e;
  --accent:       #7a3b1e;
  --accent-light: #c4813a;
  --rule:         rgba(122,59,30,0.25);
  --price-color:  #3d2e1a;
  --grain-opacity: 0.04;
  --shadow:       0 8px 48px rgba(60,30,10,0.13);
  --ornament:     #c4813a;
  --logo-color:   #967c5e;
}

.night {
  --bg:           #131009;
  --bg-card:      #1c1710;
  --text-primary: #f0e6d0;
  --text-winery:  #c9a87c;
  --text-body:    #d4c4a8;
  --text-muted:   #7a6a52;
  --accent:       #c9a87c;
  --accent-light: #e8c98a;
  --rule:         rgba(201,168,124,0.2);
  --price-color:  #f0e6d0;
  --grain-opacity: 0.055;
  --shadow:       0 8px 64px rgba(0,0,0,0.6);
  --ornament:     #c9a87c;
  --logo-color:   #5a4e3a;
}

/* ── BASE ───────────────────────────────────────────────────────────────── */

body {
  font-family: 'Lora', Georgia, serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
  min-height: 100vh;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

a {
  color: #6b2fa0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  background: #f0f0f0;
}

.btn--primary {
  background: #6b2fa0;
  color: #fff;
  border-color: #6b2fa0;
}

.btn--primary:hover {
  background: #5a2888;
}

.btn--secondary {
  background: transparent;
  color: #6b2fa0;
  border-color: #6b2fa0;
}

.btn--small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.bl-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #fff;
  background: #333;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}

.bl-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.bl-toast--error {
  background: #d32f2f;
}

.bl-toast--success {
  background: #2e7d32;
}

.bl-toast--info {
  background: #333;
}

/* ── Loading / Error states ──────────────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.error-state {
  text-align: center;
  padding: 3rem 1rem;
}

.error-state h1 {
  color: #d32f2f;
}

.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.not-found h1 {
  font-size: 3rem;
  color: #999;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #6b2fa0;
  box-shadow: 0 0 0 2px rgba(107, 47, 160, 0.2);
}
