/* ==========================================================================
   Premium Prints — kiosk terminal
   Ciljni ekran: 32", 1920x1080, touch, vodoravno.
   Sve mjere su u rem; 1rem = 20px na 1080p i skalira se sa ekranom.
   ========================================================================== */

:root {
  /* paleta izvučena iz logotipa */
  --ink:        #1D2731;
  --ink-2:      #2C3B47;
  --ink-3:      #46596A;
  --cream:      #FBF3E4;
  --cream-2:    #FFFBF2;
  --paper:      #FFFFFF;
  --orange:     #F0913A;
  --orange-d:   #D97524;
  --teal:       #3E8385;
  --teal-l:     #8ACFD1;
  --teal-pale:  #DCEFEF;
  --rust:       #C6482C;
  --sand:       #FEDE89;

  --ok:         #2E7D5B;
  --warn:       #B8791C;

  --r-sm: 0.6rem;
  --r-md: 1rem;
  --r-lg: 1.6rem;
  --r-pill: 999rem;

  --shadow-sm: 0 0.2rem 0.6rem rgba(29, 39, 49, .10);
  --shadow-md: 0 0.6rem 1.6rem rgba(29, 39, 49, .14);
  --shadow-lg: 0 1.4rem 3.4rem rgba(29, 39, 49, .22);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  /* 1rem = 20px na 1920x1080; prati manju dimenziju da ništa ne iscuri */
  font-size: min(1.8519vh, 1.0417vw);
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--ink);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  cursor: none;                 /* kiosk je touch — kursor smeta */
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body.show-cursor { cursor: default; }

img, canvas, svg { display: block; max-width: 100%; }

/* --------------------------------------------------------------- pozornica */

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--cream);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity .32s var(--ease);
}

.screen.is-active { display: flex; opacity: 1; }
.screen.is-leaving { opacity: 0; }

/* ------------------------------------------------------------------ zaglavlje */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 3rem .9rem;
}

.brand { display: flex; align-items: center; gap: 1rem; }
.brand img { width: 4.2rem; height: 4.2rem; border-radius: var(--r-sm); }

.brand-text { line-height: 1.05; }
.brand-name {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ink);
}
.brand-sub {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* koraci */
.steps { display: flex; align-items: center; gap: .7rem; }

.step {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem 1.1rem .45rem .5rem;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-3);
  font-size: .92rem;
  font-weight: 700;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.step-num {
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #E6DECE;
  color: var(--ink-3);
  font-size: .92rem;
  font-weight: 800;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.step.is-done .step-num { background: var(--teal); color: #fff; }
.step.is-done { color: var(--ink-2); }
.step.is-current { background: var(--ink); color: var(--cream-2); }
.step.is-current .step-num { background: var(--orange); color: var(--ink); }

.step-line { width: 1.6rem; height: .16rem; background: #E6DECE; border-radius: 1rem; }

/* ------------------------------------------------------------------- podnožje */

.footbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  padding: 1rem 3rem;
  background: var(--ink);
  color: #CBD6DF;
  font-size: .95rem;
  font-weight: 600;
}
.footbar .fb-item { display: flex; align-items: center; gap: .7rem; }
.footbar svg { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }
.footbar .fb-dot { width: .35rem; height: .35rem; border-radius: 50%; background: #44586A; }

/* ---------------------------------------------------------------- dugmad */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.1rem 2.4rem;
  min-height: 4.2rem;
  border: none;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 .5rem 0 var(--orange-d), var(--shadow-md);
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .2s;
  touch-action: manipulation;
}
.btn:active {
  transform: translateY(.4rem);
  box-shadow: 0 .1rem 0 var(--orange-d), var(--shadow-sm);
}
.btn svg { width: 1.8rem; height: 1.8rem; }

.btn--xl { padding: 1.4rem 3.2rem; min-height: 5.2rem; font-size: 1.75rem; }
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 .18rem #D9CEB8;
  font-size: 1.15rem;
  min-height: 3.8rem;
  padding: .9rem 2rem;
}
.btn--ghost:active { transform: none; background: #F2E9D6; box-shadow: inset 0 0 0 .18rem #C9BCA2; }
.btn--dark { background: var(--ink); color: var(--cream-2); box-shadow: 0 .5rem 0 #0E161D, var(--shadow-md); }
.btn--dark:active { box-shadow: 0 .1rem 0 #0E161D; }

.btn[disabled] {
  background: #DED5C4;
  color: #9A9182;
  box-shadow: none;
  pointer-events: none;
}

/* ============================================================== 0 · ATRAKTOR */

#s-attract { background: var(--cream); }

.attract-wrap {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 2rem;
  padding: 0 4rem 0 5rem;
}

.attract-copy h1 {
  margin: 0 0 1.2rem;
  font-size: 4.9rem;
  line-height: .96;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--ink);
}
.attract-copy h1 em {
  display: block;
  font-style: normal;
  color: var(--teal);
}
.attract-copy p {
  margin: 0 0 1.3rem;
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 26rem;
}

.price-flag {
  display: inline-flex;
  align-items: baseline;
  gap: .7rem;
  margin-bottom: 1.4rem;
  padding: .7rem 1.9rem;
  border-radius: var(--r-pill);
  background: var(--sand);
  transform: rotate(-1.6deg);
}
.price-flag .pf-label {
  font-size: 1rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2);
}
.price-flag .pf-value { font-size: 2.6rem; font-weight: 900; color: var(--ink); }

.attract-actions { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

/* pulsiranje glavnog dugmeta da privuče pogled iz prolaza */
@keyframes attract-pulse {
  0%, 82%, 100% { transform: scale(1); }
  88%           { transform: scale(1.035); }
  94%           { transform: scale(.995); }
}
#btn-start { animation: attract-pulse 3.6s var(--ease) infinite; }
#btn-start:active { animation: none; }

/* scena sa platnom na zidu */
.scene {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(178deg, #EFE6D4 0%, #E3D8C2 62%, #D8CCB4 100%);
  box-shadow: var(--shadow-lg);
}
.scene-wall {
  position: absolute; inset: 0 0 32% 0;
  background: linear-gradient(180deg, #F6EFE1, #EDE3D0);
}
.scene-floor {
  position: absolute; inset: 68% 0 0 0;
  background: linear-gradient(180deg, #C9B394, #B89C77);
}
.scene-sofa {
  position: absolute;
  left: 8%; right: 8%; bottom: 4%;
  height: 30%;
  border-radius: 1.4rem 1.4rem .6rem .6rem;
  background: linear-gradient(180deg, #4E6B72, #3B545A);
  box-shadow: 0 -0.4rem 1.6rem rgba(29,39,49,.18);
}
.scene-sofa::before,
.scene-sofa::after {
  content: "";
  position: absolute; top: 22%; width: 16%; height: 52%;
  border-radius: .5rem;
  background: var(--sand);
  opacity: .85;
}
.scene-sofa::before { left: 8%; transform: rotate(-6deg); }
.scene-sofa::after  { right: 8%; transform: rotate(5deg); background: var(--rust); opacity: .7; }

.scene-canvas {
  position: absolute;
  left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  width: 46%;
  aspect-ratio: 3 / 2;
  border-radius: .2rem;
  background: #999;
  box-shadow:
    .9rem .9rem 0 rgba(29,39,49,.10),
    0 1.2rem 2.4rem rgba(29,39,49,.28);
  overflow: hidden;
}
.scene-canvas .sc-img { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.scene-canvas .sc-img.is-on { opacity: 1; }
/* imitacija debljine rama sa desne strane */
.scene-canvas::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset -0.5rem 0 .8rem rgba(0,0,0,.20), inset 0 -0.3rem .6rem rgba(0,0,0,.12);
  pointer-events: none;
}

/* ============================================================ 1 · IZVOR SLIKE */

.body-pad { flex: 1 1 auto; padding: 0 5rem; display: flex; flex-direction: column; }

.screen-head { text-align: center; margin-bottom: 1.2rem; }
.screen-head h2 {
  margin: 0 0 .5rem;
  font-size: 2.7rem; font-weight: 900; letter-spacing: -.01em;
  color: var(--ink);
}
.screen-head p { margin: 0; font-size: 1.35rem; color: var(--ink-3); font-weight: 600; }

.choice-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  align-content: center;
  padding-bottom: 2rem;
}

.choice {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.4rem;
  padding: 3rem 2.5rem;
  border: none;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  font-family: inherit;
  cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.choice:active { transform: scale(.985); box-shadow: var(--shadow-sm); }
.choice-icon {
  width: 8.5rem; height: 8.5rem;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--teal-pale);
}
.choice-icon svg { width: 4.6rem; height: 4.6rem; color: var(--teal); }
.choice--alt .choice-icon { background: #FCEBD8; }
.choice--alt .choice-icon svg { color: var(--orange-d); }
.choice h3 { margin: 0; font-size: 2.1rem; font-weight: 900; color: var(--ink); }
.choice p { margin: 0; font-size: 1.2rem; color: var(--ink-3); font-weight: 600; text-align: center; max-width: 22rem; }

/* ============================================================== 2 · SLANJE */

.upload-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.4rem;
  align-items: stretch;
  padding-bottom: 1rem;
}

.qr-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
  padding: 1.7rem;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.qr-frame {
  position: relative;
  padding: 1.1rem;
  border-radius: var(--r-md);
  background: #fff;
}
/* uglovi oko QR-a — vizuelni „nišan" */
.qr-frame::before, .qr-frame::after,
.qr-frame > .qr-c1, .qr-frame > .qr-c2 {
  content: "";
  position: absolute;
  width: 2.6rem; height: 2.6rem;
  border: .32rem solid var(--orange);
}
.qr-frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: .7rem 0 0 0; }
.qr-frame::after  { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 .7rem 0 0; }
.qr-frame > .qr-c1 { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 .7rem; }
.qr-frame > .qr-c2 { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 .7rem 0; }
#qr-canvas { width: 15rem; height: 15rem; image-rendering: pixelated; }

.qr-card h3 { margin: 0; font-size: 1.9rem; font-weight: 900; text-align: center; color: var(--ink); }
.qr-card .qr-hint { margin: 0; font-size: 1.15rem; color: var(--ink-3); font-weight: 600; text-align: center; }

/* desna kolona */
.alt-col { display: flex; flex-direction: column; gap: .9rem; }

.alt-card {
  padding: 1.2rem 1.5rem;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.alt-card h4 {
  margin: 0 0 .8rem;
  display: flex; align-items: center; gap: .8rem;
  font-size: 1.3rem; font-weight: 800; color: var(--ink);
}
.alt-card h4 .tag {
  padding: .2rem .8rem;
  border-radius: var(--r-pill);
  background: var(--teal-pale);
  color: var(--teal);
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
}
.alt-card p { margin: 0; font-size: 1.05rem; color: var(--ink-3); font-weight: 600; line-height: 1.5; }

.code-row { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; }
.code-url { font-size: 1.35rem; font-weight: 800; color: var(--ink-2); }
.code-box {
  padding: .4rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--sand);
  font-size: 1.9rem; font-weight: 900; letter-spacing: .22em;
  font-variant-numeric: tabular-nums;
}

.viber-num {
  margin-top: .5rem;
  font-size: 1.7rem; font-weight: 900; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* upozorenje za Viber kompresiju — najvažniji tekst na ekranu */
.warn-strip {
  display: flex; align-items: flex-start; gap: .9rem;
  margin-top: .6rem;
  padding: .7rem .9rem;
  border-radius: var(--r-md);
  background: #FDF1DC;
  box-shadow: inset 0 0 0 .14rem #EBCB8E;
}
.warn-strip svg { width: 1.5rem; height: 1.5rem; color: var(--warn); flex: 0 0 auto; margin-top: .1rem; }
.warn-strip span { font-size: 1rem; font-weight: 700; color: #7A5310; line-height: 1.45; }
.warn-strip b { color: #5E3F09; }

/* traka stanja čekanja */
.wait-bar {
  display: flex; align-items: center; justify-content: center; gap: 1.1rem;
  margin-top: auto;
  padding: .9rem 1.6rem;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--cream-2);
  font-size: 1.35rem; font-weight: 700;
}
.wait-bar.is-hit { background: var(--ok); }
.wait-bar.is-bad { background: var(--rust); }
.spinner {
  width: 1.7rem; height: 1.7rem;
  border: .25rem solid rgba(255,255,255,.28);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================== 3 · KADAR, DIMENZIJA, CIJENA */

.editor-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.6rem;
  padding-bottom: .8rem;
  min-height: 0;
}

.preview-pane {
  display: flex; flex-direction: column; gap: 1.1rem;
  min-height: 0;
}

.canvas-stage {
  flex: 1 1 auto;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #F3EBDA, #E8DFCB);
  box-shadow: inset 0 0 0 .14rem #E0D5BF;
  min-height: 0;
  overflow: hidden;
}

/* okvir platna sa vidljivim preklopom preko rama */
.canvas-mock {
  position: relative;
  box-shadow: 0 1rem 2.4rem rgba(29,39,49,.28);
  background: #ddd;
  overflow: hidden;
}
.canvas-mock img { position: absolute; transform-origin: 0 0; }
.canvas-mock::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset -0.45rem 0 .7rem rgba(0,0,0,.18), inset 0 -0.25rem .5rem rgba(0,0,0,.10);
  pointer-events: none;
}
/* zona preklopa — pojas koji se savija preko rama i ne vidi se sprijeda.
   Debljina se postavlja iz JS-a (--fold), jer zavisi od odabrane dimenzije. */
.wrap-zone {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.wrap-zone::after {
  content: "";
  position: absolute;
  inset: var(--fold, 0px);
  outline: .16rem dashed rgba(255,255,255,.85);
  outline-offset: -.08rem;
}
.canvas-mock.show-wrap .wrap-zone { opacity: 1; }

.preview-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.seg {
  display: inline-flex;
  padding: .3rem;
  border-radius: var(--r-pill);
  background: #E8DFCB;
}
.seg button {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.5rem;
  border: none; border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-3);
  font-family: inherit; font-size: 1.05rem; font-weight: 800;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.seg button.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg svg { width: 1.3rem; height: 1.3rem; }

.tool-hint { font-size: 1rem; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: .6rem; }
.tool-hint svg { width: 1.3rem; height: 1.3rem; }

/* --- desna kolona: dimenzije --- */
.size-pane { display: flex; flex-direction: column; min-height: 0; }
.size-pane h3 { margin: 0 0 .7rem; font-size: 1.7rem; font-weight: 900; color: var(--ink); }

.size-list { display: flex; flex-direction: column; gap: .55rem; }

.size-opt {
  display: flex; align-items: center; gap: 1.1rem;
  padding: .8rem 1.2rem;
  border: none;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: inset 0 0 0 .14rem #E4DAC6;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow .18s var(--ease), background .18s var(--ease);
}
.size-opt .radio {
  width: 1.9rem; height: 1.9rem; flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 .2rem #C9BCA2;
  display: grid; place-items: center;
  transition: box-shadow .18s var(--ease);
}
.size-opt .radio::after {
  content: ""; width: .95rem; height: .95rem; border-radius: 50%;
  background: var(--orange); transform: scale(0);
  transition: transform .18s var(--ease);
}
.size-opt.is-on { box-shadow: inset 0 0 0 .22rem var(--orange); background: #FFF8EE; }
.size-opt.is-on .radio { box-shadow: inset 0 0 0 .2rem var(--orange); }
.size-opt.is-on .radio::after { transform: scale(1); }

.size-dim { flex: 1 1 auto; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.size-dim small { display: block; font-size: .92rem; font-weight: 700; color: var(--ink-3); }
.size-price { font-size: 1.55rem; font-weight: 900; color: var(--ink); white-space: nowrap; }
.size-opt.is-on .size-price { color: var(--orange-d); }

/* dimenzija koju rezolucija ne podnosi */
.size-opt.is-blocked { background: #F4EFE5; box-shadow: inset 0 0 0 .14rem #E4DAC6; opacity: .72; }
.size-opt.is-blocked .size-dim, .size-opt.is-blocked .size-price { color: #9A9182; }
.size-opt.is-blocked .radio { box-shadow: inset 0 0 0 .2rem #D7CCB6; }
.size-blocked-note {
  display: flex; align-items: center; gap: .4rem;
  font-size: .88rem; font-weight: 800; color: var(--rust);
}
.size-blocked-note svg { width: 1.1rem; height: 1.1rem; }

/* rezime */
.total-card {
  margin-top: auto;
  padding: 1rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--cream-2);
}
.total-row { display: flex; align-items: baseline; justify-content: space-between; }
.total-row .tl { font-size: 1.15rem; font-weight: 700; color: #A9BAC7; letter-spacing: .1em; text-transform: uppercase; }
.total-row .tv { font-size: 3rem; font-weight: 900; color: var(--sand); }
.total-note { margin: .3rem 0 0; font-size: .98rem; font-weight: 600; color: #A9BAC7; }

/* kvalitet slike */
.quality {
  display: flex; align-items: center; gap: .8rem;
  margin-top: .7rem;
  padding: .6rem .9rem;
  border-radius: var(--r-md);
  font-size: .98rem; font-weight: 700;
}
.quality svg { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; }
.quality--ok   { background: #E4F2EA; color: #1F5C42; }
.quality--warn { background: #FDF1DC; color: #7A5310; }
.quality--bad  { background: #FBE6E1; color: #8E2E17; }

/* =========================================================== 4 · GALERIJA */

.gallery-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.4rem;
  padding-bottom: .8rem;
  min-height: 0;
  overflow: hidden;
}
.art {
  position: relative;
  border: none; padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.art:active { transform: scale(.975); }
.art.is-on { box-shadow: 0 0 0 .3rem var(--orange), var(--shadow-md); }
.art-fill { position: absolute; inset: 0; }
.art-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .9rem 1rem .8rem;
  background: linear-gradient(180deg, rgba(29,39,49,0), rgba(29,39,49,.86));
  color: #fff; font-size: 1.05rem; font-weight: 800; text-align: left;
}

/* ============================================================== 5 · PODACI */

.form-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  padding-bottom: .8rem;
  min-height: 0;
}

.field { margin-bottom: .5rem; }
.field label {
  display: block;
  margin-bottom: .25rem;
  font-size: .95rem; font-weight: 800; color: var(--ink-2);
  letter-spacing: .04em;
}
.field .inp {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 1.1rem;
  min-height: 3.3rem;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: inset 0 0 0 .16rem #E4DAC6;
  font-size: 1.4rem; font-weight: 700; color: var(--ink);
  cursor: pointer;
  transition: box-shadow .18s var(--ease);
}
.field .inp svg { width: 1.5rem; height: 1.5rem; color: var(--ink-3); flex: 0 0 auto; }
.field .inp .val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field .inp .val:empty::before { content: attr(data-ph); color: #A79C88; font-weight: 600; }
.field.is-focus .inp { box-shadow: inset 0 0 0 .22rem var(--orange); background: #FFFBF2; }
.field.is-bad .inp { box-shadow: inset 0 0 0 .22rem var(--rust); }
.field .err { display: none; margin-top: .35rem; font-size: .95rem; font-weight: 700; color: var(--rust); }
.field.is-bad .err { display: block; }

/* karet */
.field.is-focus .val::after {
  content: "";
  display: inline-block;
  width: .12rem; height: 1.5rem;
  margin-left: .1rem;
  background: var(--ink);
  vertical-align: -.25rem;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* saglasnost */
.consent {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .7rem 1rem;
  border-radius: var(--r-md);
  background: #F4EEE1;
  cursor: pointer;
}
.consent .box {
  width: 2.1rem; height: 2.1rem; flex: 0 0 auto;
  border-radius: .45rem;
  background: var(--paper);
  box-shadow: inset 0 0 0 .18rem #C9BCA2;
  display: grid; place-items: center;
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}
.consent .box svg { width: 1.3rem; height: 1.3rem; color: #fff; transform: scale(0); transition: transform .16s var(--ease); }
.consent.is-on .box { background: var(--orange); box-shadow: inset 0 0 0 .18rem var(--orange); }
.consent.is-on .box svg { transform: scale(1); }
.consent span { font-size: 1.02rem; font-weight: 600; color: var(--ink-2); line-height: 1.5; }
.consent.is-bad .box { box-shadow: inset 0 0 0 .18rem var(--rust); }

/* rezime narudžbe u formi */
.order-summary {
  display: flex; flex-direction: column; gap: .85rem;
  padding: 1.4rem;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.os-top { display: flex; gap: 1.4rem; align-items: center; }
.os-thumb {
  width: 9rem; flex: 0 0 auto;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #ddd;
}
.os-thumb img { width: 100%; display: block; }
.os-meta h4 { margin: 0 0 .3rem; font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.os-meta p { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink-3); }

.os-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; font-weight: 700; color: var(--ink-2); }
.os-line .muted { color: var(--ink-3); font-weight: 600; }
.os-div { height: .12rem; background: #EDE4D2; border-radius: 1rem; }
.os-total { display: flex; justify-content: space-between; align-items: baseline; }
.os-total .l { font-size: 1.2rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.os-total .v { font-size: 2.6rem; font-weight: 900; color: var(--orange-d); }

.pay-note {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--teal-pale);
  color: #265F60;
  font-size: 1.02rem; font-weight: 700;
}
.pay-note svg { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }

/* --------------------------------------------------- tastatura na ekranu */

#keyboard {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .9rem 1.5rem 1rem;
  background: var(--ink);
  box-shadow: 0 -1rem 2.4rem rgba(29,39,49,.3);
  transform: translateY(100%);
  transition: transform .28s var(--ease);
  z-index: 40;
}
#keyboard.is-up { transform: translateY(0); }

.kb-row { display: flex; justify-content: center; gap: .4rem; margin-bottom: .4rem; }
.kb-key {
  min-width: 3.8rem; height: 3.4rem;
  padding: 0 .8rem;
  border: none; border-radius: .6rem;
  background: #37485A;
  color: #F2F6F9;
  font-family: inherit; font-size: 1.35rem; font-weight: 700;
  cursor: pointer;
  transition: background .1s;
}
.kb-key:active { background: var(--orange); color: var(--ink); }
.kb-key--wide { min-width: 7rem; }
.kb-key--space { min-width: 22rem; }
.kb-key--act { background: var(--teal); }
.kb-key--done { background: var(--orange); color: var(--ink); min-width: 9rem; font-weight: 800; }
.kb-key svg { width: 1.6rem; height: 1.6rem; margin: 0 auto; }

/* ============================================================== 6 · HVALA */

#s-done { background: var(--ink); color: var(--cream-2); }
#s-done .topbar .brand-name { color: var(--cream-2); }
#s-done .topbar .brand-sub { color: #7C90A1; }

.done-wrap {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.4rem;
  text-align: center;
  padding: 0 5rem 2rem;
}

.done-check {
  width: 9rem; height: 9rem;
  border-radius: 50%;
  background: var(--teal);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1rem rgba(62,131,133,.22);
  animation: pop .5s var(--ease) both;
}
.done-check svg { width: 4.6rem; height: 4.6rem; color: #fff; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.done-wrap h2 { margin: 0; font-size: 4rem; font-weight: 900; letter-spacing: -.01em; }
.done-wrap p.lead { margin: 0; font-size: 1.45rem; color: #A9BAC7; font-weight: 600; }

.order-code {
  margin-top: .6rem;
  padding: 1.2rem 2.8rem;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 .16rem rgba(255,255,255,.16);
}
.order-code .oc-l {
  font-size: .95rem; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: #8DA0AF;
}
.order-code .oc-v {
  font-size: 3.4rem; font-weight: 900; color: var(--teal-l);
  font-variant-numeric: tabular-nums; letter-spacing: .06em;
}

.done-facts { display: flex; gap: 2.6rem; margin-top: .6rem; }
.done-facts .df { display: flex; align-items: center; gap: .8rem; font-size: 1.12rem; font-weight: 700; color: #C4D2DC; }
.done-facts svg { width: 1.6rem; height: 1.6rem; color: var(--teal-l); }

.done-timer { margin-top: .4rem; font-size: 1.05rem; font-weight: 700; color: #7C90A1; }

/* ====================================================== modal neaktivnosti */

#idle-modal {
  position: absolute; inset: 0;
  display: none;
  place-items: center;
  background: rgba(29,39,49,.72);
  backdrop-filter: blur(.3rem);
  z-index: 60;
}
#idle-modal.is-on { display: grid; }
.idle-card {
  padding: 3rem 3.6rem;
  border-radius: var(--r-lg);
  background: var(--cream-2);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop .3s var(--ease) both;
}
.idle-card h3 { margin: 0 0 .6rem; font-size: 2.4rem; font-weight: 900; color: var(--ink); }
.idle-card p { margin: 0 0 1.8rem; font-size: 1.25rem; font-weight: 600; color: var(--ink-3); }
.idle-count {
  display: inline-grid; place-items: center;
  width: 5.5rem; height: 5.5rem;
  margin-bottom: 1.6rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-size: 2.6rem; font-weight: 900;
}

/* ------------------------------------------------------------------ pomoćno */

.row { display: flex; align-items: center; gap: 1.2rem; }
.spacer { flex: 1 1 auto; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 0 .7rem; }
.hidden { display: none !important; }

/* Dok je tastatura otvorena, naslov se sklanja — polja moraju ostati
   iznad tastature, inače kupac kuca u polje koje ne vidi. */
#s-form.kb-open .screen-head { display: none; }
#s-form.kb-open .order-summary { visibility: hidden; }

/* Red sa dugmadima leži iza tastature. Skrivamo ga da kupac ne tapka po
   dugmetu koje ne vidi — a pod prstom mu je taster tastature. */
#s-form.kb-open .nav-row { visibility: hidden; }

/* Upozorenje uz saglasnost — bez njega pritisak na „Potvrdi narudžbu“
   izgleda kao da se ništa nije desilo. */
.consent-err {
  display: none;
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
  padding: .7rem 1rem;
  border-radius: var(--r-md);
  background: #FBE6E1;
  color: #8E2E17;
  font-size: 1.02rem;
  font-weight: 800;
}
.consent-err.is-on { display: flex; }
.consent-err svg { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }

/* Kad je sve popunjeno, dugme za slanje mora da skoči u oči — ono je jedini
   preostali potez, a tek se pojavilo iza sklonjene tastature. */
@keyframes ready-pulse {
  0%, 70%, 100% { transform: scale(1); box-shadow: 0 .5rem 0 var(--orange-d), var(--shadow-md); }
  80%           { transform: scale(1.04); box-shadow: 0 .5rem 0 var(--orange-d), 0 0 0 .5rem rgba(240,145,58,.35); }
}
.btn.is-ready { animation: ready-pulse 2s var(--ease) infinite; }
.btn.is-ready:active { animation: none; }
