/* Vodič ob prvi prijavi, spodnji list z navodilom za začetni zaslon in pasica s predlogom.
 * Vse barve so iz teme (--card, --brand …), zato sledi vsem osmim temam. */

.tour { position: fixed; inset: 0; z-index: 120; }

/* Osvetljeno območje: velika senca naredi zatemnitev okoli njega, zato se
 * zatemnitev in osvetlitev premikata skupaj kot ena stvar. */
.tour__spot {
  position: fixed; left: 50%; top: 50%; width: 0; height: 0;
  box-shadow: 0 0 0 100vmax rgba(8, 18, 14, .66), 0 0 0 2px rgba(255, 255, 255, .9) inset;
  pointer-events: none; opacity: 0;
  transition: opacity .35s ease;
}
/* Premik šele po prvem izrisu, da kartica ne zdrsi iz kota. */
.tour.is-ready .tour__spot {
  transition: left .55s cubic-bezier(.22, 1, .36, 1), top .55s cubic-bezier(.22, 1, .36, 1),
    width .55s cubic-bezier(.22, 1, .36, 1), height .55s cubic-bezier(.22, 1, .36, 1),
    border-radius .55s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
}
.tour.is-open .tour__spot { opacity: 1; }
/* Blokira klike v ozadju, medtem ko je vodič odprt. */
.tour::before { content: ''; position: fixed; inset: 0; }

.tour__card {
  --pointer-x: 50%; --pointer-y: 50%;
  position: fixed; left: 0; top: 0; width: min(360px, calc(100vw - 32px));
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 20px 16px; box-shadow: 0 18px 48px rgba(8, 18, 14, .35);
  opacity: 0;
  transition: opacity .3s ease;
}
.tour.is-ready .tour__card { transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
.tour.is-open .tour__card { opacity: 1; }
.tour.is-leaving .tour__card, .tour.is-leaving .tour__spot { opacity: 0; transition-duration: .3s; }
.tour.is-leaving { pointer-events: none; }

/* Kazalec kartice proti osvetljenemu elementu. */
.tour__card::after {
  content: ''; position: absolute; width: 14px; height: 14px; background: var(--card);
  border: 1px solid var(--line); transform: rotate(45deg); opacity: 0; transition: opacity .25s ease;
}
.tour__card--pointer::after {
  opacity: 1; left: -8px; top: var(--pointer-y); margin-top: -7px; border-right: 0; border-top: 0;
}
.tour__card--pointer-down::after {
  opacity: 1; bottom: -8px; left: var(--pointer-x); margin-left: -7px; border-left: 0; border-top: 0;
}

.tour__content > * { opacity: 0; }
.tour__content.is-in > * { animation: tour-in .42s cubic-bezier(.22, 1, .36, 1) both; }
.tour__content.is-in > :nth-child(2) { animation-delay: 60ms; }
.tour__content.is-in > :nth-child(3) { animation-delay: 120ms; }
@keyframes tour-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tour__content h2 { font: 700 20px/1.2 var(--font-display); margin: 0 0 6px; color: var(--text); }
.tour__content p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text2, var(--mut)); }
.tour__count { font: 500 12px var(--font-mono); color: var(--mut); margin-bottom: 6px; }

.tour__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.tour__dots { display: flex; gap: 5px; align-items: center; }
.tour__dots i {
  display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--lines);
  transition: width .4s cubic-bezier(.22, 1, .36, 1), background-color .3s ease;
}
.tour__dots i.done { background: var(--brandl); }
.tour__dots i.on { width: 20px; background: var(--brand); }
.tour__buttons { display: flex; gap: 6px; margin-left: auto; }
.tour__buttons .btn { gap: 6px; }
.tour__buttons [hidden] { display: none; }

/* Pozdrav: mala nadzorna plošča, ki se sestavi sama. */
.tour__art { position: relative; height: 112px; margin-bottom: 14px; display: flex; align-items: flex-end; justify-content: center; }
.tour__art-card {
  width: 170px; height: 104px; border: 1px solid var(--line); border-radius: 12px; background: var(--hover);
  padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  animation: tour-in .5s cubic-bezier(.22, 1, .36, 1) both;
}
.tour__art-bar { display: block; height: 6px; width: 40%; border-radius: 3px; background: var(--lines); }
.tour__art-bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; }
.tour__art-bars i {
  flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--brand); transform-origin: bottom;
  animation: tour-grow .7s cubic-bezier(.22, 1, .36, 1) both;
}
.tour__art-bars i:nth-child(2) { animation-delay: .08s; background: var(--brandl); }
.tour__art-bars i:nth-child(3) { animation-delay: .16s; }
.tour__art-bars i:nth-child(4) { animation-delay: .24s; background: var(--brandl); }
.tour__art-bars i:nth-child(5) { animation-delay: .32s; }
.tour__art-rows { display: none; }
@keyframes tour-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.tour__art-check, .tour__tick {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--onbrand);
}
.tour__art-check { position: absolute; right: calc(50% - 108px); top: 0; animation: tour-pop .5s .55s cubic-bezier(.34, 1.4, .64, 1) both; }
.tour__tick { width: 52px; height: 52px; margin-bottom: 12px; animation: tour-pop .55s cubic-bezier(.34, 1.4, .64, 1) both; }
.tour__tick svg path, .tour__art-check svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tour-draw .4s .45s ease-out forwards; }
@keyframes tour-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tour-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 820px) {
  .tour__card { padding: 18px 16px 14px; border-radius: 18px; }
  .tour__content h2 { font-size: 19px; }
  .tour__buttons { width: 100%; justify-content: flex-end; }
  .tour__dots { order: 2; width: 100%; justify-content: center; margin-top: 4px; }
}

/* ---- spodnji list: navodilo za začetni zaslon ---- */
.sheet { position: fixed; inset: 0; z-index: 130; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(8, 18, 14, .6); opacity: 0; transition: opacity .3s ease; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel {
  position: relative; width: min(520px, 100%); max-height: 92dvh; overflow-y: auto;
  background: var(--card); color: var(--text); border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet.is-leaving .sheet__panel { transform: translateY(100%); transition-duration: .24s; }
.sheet.is-leaving .sheet__scrim { opacity: 0; }
.sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--lines); margin: 0 auto 14px; }
.sheet__body { display: grid; gap: 18px; }
.sheet__text h2 { font: 700 21px/1.2 var(--font-display); margin: 0 0 6px; }
.sheet__text p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: var(--mut); }
.sheet__steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.sheet__steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; line-height: 1.4; }
.sheet__steps li::before {
  content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sel); color: var(--brandd); font: 700 13px var(--font-body);
}
.sheet__note { font-size: 13px !important; margin-bottom: 0 !important; }
.sheet__actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet__actions .btn { flex: 1; }

/* Telefon z orodno vrstico; dve sliki se menjata v zanki. */
.phone-mock {
  position: relative; width: 100%; max-width: 280px; height: 190px; margin: 0 auto; overflow: hidden;
  border: 1px solid var(--line); border-radius: 22px; background: var(--hover);
}
.phone-mock__page { position: absolute; inset: 0; padding: 38px 16px 0; display: grid; gap: 8px; align-content: start; }
.phone-mock--android .phone-mock__page { padding-top: 58px; }
.phone-mock__page i { display: block; height: 10px; border-radius: 5px; background: var(--track); }
.phone-mock__page i:nth-child(2) { width: 70%; }
.phone-mock__page i:nth-child(3) { width: 45%; }
.phone-mock__bar {
  position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-around;
  background: var(--card); border-color: var(--line); color: var(--mut);
}
.phone-mock__bar--bottom { bottom: 0; height: 46px; border-top: 1px solid var(--line); }
.phone-mock__bar--top { top: 0; height: 46px; border-bottom: 1px solid var(--line); padding: 0 8px 0 12px; gap: 8px; justify-content: flex-start; }
.phone-mock__bar .url { flex: 1; background: var(--chip); border-radius: 14px; height: 28px; display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--chipi); }
.phone-mock__bar span { display: grid; place-items: center; width: 34px; height: 34px; position: relative; }
.phone-mock__bar span.url { width: auto; }
.phone-mock__bar .dim { opacity: .4; }
.phone-mock svg { width: 20px; height: 20px; }
.phone-mock .hit { color: var(--brand); position: relative; }
/* Utripajoč obroč okoli tistega, kar je treba tapniti. */
.phone-mock em {
  position: absolute; inset: -4px; border-radius: 12px; border: 2px solid var(--brand);
  animation: mock-ping 1.8s ease-out infinite;
}
@keyframes mock-ping { 0% { transform: scale(.8); opacity: 1; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

.phone-mock__scene { position: absolute; inset: 0; opacity: 0; }
.phone-mock--ios .phone-mock__scene--a { animation: mock-a 6s infinite; }
.phone-mock__scene--b { animation: mock-b 6s infinite; }
.phone-mock--android .phone-mock__scene--b { animation: mock-b-android 6s infinite; }
@keyframes mock-a { 0%, 42% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes mock-b { 0%, 46% { opacity: 0; } 54%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mock-b-android { 0%, 30% { opacity: 0; } 38%, 92% { opacity: 1; } 100% { opacity: 0; } }
.phone-mock--android .phone-mock__bar .hit em { animation-duration: 1.8s; }

.phone-mock__sheet, .phone-mock__menu {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 28px rgba(8, 18, 14, .22);
}
.phone-mock__sheet { left: 14px; right: 14px; bottom: 10px; animation: mock-rise 6s infinite; }
.phone-mock__menu { right: 10px; top: 50px; width: 62%; }
.phone-mock .row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 12.5px; border-top: 1px solid var(--line2); position: relative; }
.phone-mock .row:first-child { border-top: 0; }
.phone-mock .row b { width: 14px; height: 14px; border-radius: 4px; background: var(--track); }
.phone-mock .row.hit { background: var(--sel); color: var(--brandd); font-weight: 600; }
.phone-mock .row.hit em { inset: 2px; border-radius: 10px; animation-duration: 1.8s; }
@keyframes mock-rise { 0%, 50% { transform: translateY(12px); } 62%, 100% { transform: none; } }

/* ---- pasica s predlogom ---- */
.install-banner {
  position: fixed; z-index: 34; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom) + 10px);
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(8, 18, 14, .18);
  opacity: 0; transform: translateY(16px); transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.install-banner.is-open { opacity: 1; transform: none; }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner__text { flex: 1; min-width: 0; display: grid; font-size: 12.5px; color: var(--mut); line-height: 1.3; }
.install-banner__text strong { font-size: 14px; color: var(--text); }
@media (min-width: 821px) { .install-banner { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .tour *, .tour, .sheet *, .sheet, .install-banner, .phone-mock * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .phone-mock__scene { animation: none !important; opacity: 1; }
  .phone-mock--ios .phone-mock__scene--a { opacity: 0; }
}
