/* ═══════════════════════════════════════════════════════════
   MIJNWIJN — style.css
   Aanpassen? Zie de secties hieronder:
   1. KLEUREN & THEMA  ← verander hier de kleuren
   2. TYPOGRAFIE       ← verander hier de fonts
   3. LAYOUT           ← verander hier maten en afstanden
   ═══════════════════════════════════════════════════════════ */


/* ── 1. KLEUREN & THEMA ─────────────────────────────────────
   Verander hier de CSS-variabelen om het hele thema te wijzigen
   ─────────────────────────────────────────────────────────── */
:root {
  /* Achtergronden */
  --bg:        #f1f3f4;   /* Lichtgrijs pagina-achtergrond (Google-stijl) */
  --surface:   #ffffff;   /* Wit voor kaartjes en header */
  --surface2:  #f8f9fa;   /* Lichtgrijs voor invoervelden en hover */
  --border:    #dadce0;   /* Subtiele grijze rand (Google-stijl) */

  /* Accentkleuren */
  --accent:    #1a73e8;   /* Google blauw — primaire knop */
  --accent2:   #1557b0;   /* Donkerder blauw voor hover */
  --gold:      #1a73e8;   /* Blauw voor sterren en titels */

  /* Tekst */
  --text:      #202124;   /* Bijna zwart (Google tekst) */
  --muted:     #5f6368;   /* Grijs voor subtekst (Google-stijl) */

  /* Wijnsoort kleuren */
  --rood-c:    #d93025;   /* Google rood */
  --wit-c:     #1a73e8;   /* Google blauw */
  --rose-c:    #e52592;   /* Roze */
}


/* ── 2. TYPOGRAFIE ──────────────────────────────────────────
   Verander hier de lettertypen
   ─────────────────────────────────────────────────────────── */
:root {
  --font-body:    'Google Sans', 'Roboto', sans-serif;
  --font-display: 'Google Sans', 'Roboto', sans-serif;
}


/* ── 3. LAYOUT ──────────────────────────────────────────────
   Verander hier maten, afstanden en afronding
   ─────────────────────────────────────────────────────────── */
:root {
  --radius:     8px;    /* Afronding kaartjes */
  --radius-lg:  18px;   /* Afronding modals */
  --card-pad:   10px 12px;
  --page-max:   660px;  /* Max breedte op desktop */
}


/* ── RESET & BASIS ──────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}


/* ── LOGIN SCHERM ───────────────────────────────────────────── */
#loginScreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f1f3f4;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.login-logo {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.login-logo em {
  font-style: normal;
  color: var(--text);
}

.login-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

#googleSignInBtn {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

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


/* ── HEADER ─────────────────────────────────────────────────── */
.hdr {
  background: #1a73e8;
  border-bottom: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  padding: 0 14px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: .3px;
}

.logo em {
  font-style: normal;
  color: #ffffff;
}

.hdr-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.user-name {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  margin-right: 4px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ico-btn {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.ico-btn:hover {
  border-color: rgba(255,255,255,.6);
  color: #ffffff;
  background: rgba(255,255,255,.25);
}


/* ── DRIVE STATUS BAR ───────────────────────────────────────── */
.drive-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

.dot.ok   { background: #34a853; }
.dot.busy { background: #fbbc04; animation: blink 1s infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}


/* ── TABS ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: all .15s;
}

.tab.on {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* ── FILTERS ────────────────────────────────────────────────── */
.filters {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.frow {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

.frow:last-child { border-bottom: none; }
.frow::-webkit-scrollbar { display: none; }

.flabel {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 36px;
}

.chip {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: all .15s;
}

.chip.on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.chip-score.on {
  border-color: var(--gold);
  background: rgba(201,169,110,.15);
  color: var(--gold);
}


/* ── DROPDOWN FILTERS ───────────────────────────────────────── */
.droprow {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.droprow select {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}


/* ── ZOEK + SORTEER ─────────────────────────────────────────── */
.searchrow {
  padding: 7px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  align-items: center;
}

.search-wrap {
  flex: 1;
  position: relative;
}

.search-wrap input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px 8px 32px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
}

.search-wrap input::placeholder { color: var(--muted); }

.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.sort-sel {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 7px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}


/* ── RESULTAAT TELLER ───────────────────────────────────────── */
.countbar {
  padding: 5px 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}


/* ── WIJNLIJST & KAARTJES ───────────────────────────────────── */
.wlist {
  padding: 8px 10px 80px;
}

.wcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  padding: var(--card-pad);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: box-shadow .15s, border-color .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Alle kaartjes individueel afgerond in light theme */
.wlist .wcard:first-child  { border-radius: var(--radius); margin-top: 0; }
.wlist .wcard:last-child   { border-radius: var(--radius); }
.wlist .wcard:only-child   { border-radius: var(--radius); }

.wcard:hover {
  background: #e8f0fe;
  border-color: #1a73e8;
}

/* Gekleurde stip (wijnsoort) */
.wdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dr   { background: var(--rood-c); }
.dw   { background: var(--wit-c); }
.dro  { background: var(--rose-c); }

/* Kaartje inhoud */
.wbody  { flex: 1; min-width: 0; }

.wrow1  { display: flex; align-items: baseline; margin-bottom: 3px; }
.wname  { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Soort badge */
.wsoort { font-size: 11px; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; font-weight: 500; }
.sr  { background: #fce8e6; color: #d93025; }
.sw  { background: #e8f0fe; color: #1a73e8; }
.sro { background: #fce4ec; color: #e52592; }

/* Regel 2: meta links, sterren+badge+prijs rechts */
.wrow2       { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wmeta       { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }
.wrow2-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wp          { font-size: 12px; color: var(--muted); }

/* Sterren — groter en goed zichtbaar */
.wstars      { font-size: 17px; color: #fbbc04; letter-spacing: 1px; line-height: 1; }
.wstars.none { color: #dadce0; font-size: 14px; letter-spacing: 1px; }

/* Leeg resultaat */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); font-size: 14px; }


/* ── FAB (Toevoegen knop) ───────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26,115,232,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  transition: transform .1s, box-shadow .15s;
}

.fab:hover { box-shadow: 0 6px 16px rgba(26,115,232,.5); }
.fab:active { transform: scale(.92); }


/* ── MODALS (overlay + sheet) ───────────────────────────────── */
.overlay, .form-ov {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  display: none;
  align-items: flex-end;
}

.overlay.open, .form-ov.open { display: flex; }

.form-ov { z-index: 300; }

.sheet, .fsheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 18px 36px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
}

.fsheet { max-height: 96vh; }

.handle {
  width: 32px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 14px;
}


/* ── DETAIL MODAL INHOUD ────────────────────────────────────── */
.mhdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mtitle {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
}

.mclose {
  background: var(--surface2);
  border: none;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mstars { font-size: 22px; color: var(--gold); margin-bottom: 12px; }

.mgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.mf {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.mf.full { grid-column: 1 / -1; }

.mfl { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 3px; }
.mfv { font-size: 15px; }

.mbtns { display: flex; gap: 7px; }

.mbtn {
  padding: 9px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  flex: 1;
}

.mbtn-sec { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.mbtn-del { background: #fce8e6; color: #d93025; border: 1px solid #f5c6c3; }


/* ── FORMULIER ──────────────────────────────────────────────── */
.ftitle {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 14px;
}

.frow2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fl {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 5px;
}

.fi, .fs, .fta {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  margin-bottom: 10px;
}

.fi:focus, .fs:focus, .fta:focus { border-color: var(--accent2); }

.fta { resize: vertical; min-height: 60px; }

/* Sterrenpicker */
.spicker { display: flex; gap: 3px; margin-bottom: 10px; }
.sbtn { font-size: 20px; cursor: pointer; color: #dadce0; background: none; border: none; padding: 2px; }
.sbtn.lit { color: #fbbc04; }

.fbtns { display: flex; gap: 7px; margin-top: 4px; }

.fbtn {
  padding: 10px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  flex: 1;
}

.fbtn-pri { background: var(--accent); color: #fff; font-weight: 600; }
.fbtn-sec { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }


/* ── STATISTIEKEN ───────────────────────────────────────────── */
.sview { padding: 12px; display: none; }
.sview.on { display: block; }

.sgrid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.scard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.scard-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.snum  { font-size: 30px; font-family: var(--font-display); font-weight: 500; color: var(--accent); }
.slabel { font-size: 11px; color: var(--muted); margin-top: 2px; }

.srow {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.srow:last-child { border-bottom: none; }

.sbar-wrap { flex: 1; margin: 0 8px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sbar { height: 100%; border-radius: 2px; background: var(--accent); }
.sval { font-size: 11px; min-width: 24px; text-align: right; }


/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%);
  background: #202124;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 500;
  display: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.toast.show {
  display: block;
  animation: tf 2.5s forwards;
}

@keyframes tf {
  0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}


/* ── DESKTOP ────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .wlist, .sview { max-width: var(--page-max); margin: 0 auto; }
  .sheet, .fsheet { max-width: 580px; margin: 0 auto; border-radius: var(--radius-lg); }
  .overlay, .form-ov { align-items: center; justify-content: center; }
}
