/* Guides (vodiči): the "Pokreni vodič" card in the manual, and the overlay of TourOverlay.razor + js/tour.js. */

/* ── card in the manual (ManualMarkdown: a vodic: link) ── */
.um-text a.um-tour {
    display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; padding: 14px 16px;
    border: 1px solid rgba(245, 130, 31, .45); border-radius: 12px; background: #fff3e8;
    color: inherit; font-weight: inherit; text-decoration: none; cursor: pointer;
}
.um-text a.um-tour:hover { color: inherit; border-color: #f5821f; }
.um-text a.um-tour:focus-visible { outline: 3px solid rgba(0, 57, 81, .45); outline-offset: 2px; }
/* Signed out (the sign-in page) there is no app to guide through (UserManualPanel). */
.um-signed-out .um-text a.um-tour { display: none; }
.um-tour-ico {
    width: 44px; height: 44px; flex: none; border-radius: 12px; background: #ED880E; color: #3f2600;
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    box-shadow: 0 4px 12px rgba(245, 130, 31, .32);
}
.um-tour-text { flex: 1; min-width: 0; line-height: 1.3; }
.um-tour-text b { display: block; color: #12314c; font-size: 16px; }
.um-tour-btn {
    flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
    border-radius: 10px; background: var(--teal); color: #fff; font-size: 15.5px; font-weight: 700; white-space: nowrap;
}
.um-text a.um-tour:hover .um-tour-btn { background: #002a3c; }

/* ── overlay ── */
/* Dim + spotlight: one ring round the element; its huge shadow is the dim, so the element itself stays clickable. */
.tour-spot {
    position: fixed; z-index: 1100; border-radius: 12px; pointer-events: none;
    box-shadow: 0 0 0 4px #f5821f, 0 0 0 9px rgba(245, 130, 31, .28), 0 0 0 200vmax rgba(0, 25, 36, .62);
    transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
.tour-dim { position: fixed; inset: 0; z-index: 1099; background: rgba(0, 25, 36, .55); }
/* The end card found its new row: the spotlight round the row is the dim. */
body.tour-lit .tour-dim { display: none; }

/* Pop-ups the app opens from a highlighted field (address, date, list, messages) stay above the dim. */
body.tour-on .pac-container,
body.tour-on .flatpickr-calendar,
body.tour-on .blazored-toast-container { z-index: 1103 !important; }

.tour-bubble {
    position: fixed; z-index: 1101; width: 360px; max-width: calc(100vw - 16px); background: #fff; border-radius: 14px;
    padding: 16px 16px 14px; box-shadow: 0 18px 48px rgba(0, 57, 81, .28); color: var(--stas-text-primary);
    font-family: inherit; text-align: left;
}
/* tour.js places it; until then (the first frame) it is not shown in the corner. */
.tour-bubble:not([data-place]) { visibility: hidden; }
.tour-bubble[data-place="center"] { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-bubble[data-shake] { animation: tour-shake .36s ease; }
.tour-bubble[data-place="center"][data-shake] { animation: none; }
@keyframes tour-shake {
    0%, 100% { translate: 0 0; }
    20% { translate: -8px 0; }
    40% { translate: 7px 0; }
    60% { translate: -5px 0; }
    80% { translate: 3px 0; }
}

.tour-arrow { position: absolute; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.tour-bubble[data-place="below"] .tour-arrow { top: -7px; }
.tour-bubble[data-place="above"] .tour-arrow { bottom: -7px; }
.tour-bubble[data-place="right"] .tour-arrow { left: -7px; }
.tour-bubble[data-place="left"] .tour-arrow { right: -7px; }
.tour-bubble[data-place="corner"] .tour-arrow,
.tour-bubble[data-place="center"] .tour-arrow,
.tour-bubble[data-place="sheet"] .tour-arrow,
.tour-bubble[data-place="sheet-top"] .tour-arrow { display: none; }

.tour-head { display: flex; align-items: center; gap: 10px; }
.tour-head-ico {
    flex: none; width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: var(--stas-accent-soft); color: var(--stas-accent); font-size: 14px;
}
.tour-name {
    flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tour-count {
    flex: none; padding: 2px 9px; border-radius: 999px; background: var(--stas-bg-muted); color: var(--stas-text-secondary);
    font-size: 12px; font-weight: 700;
}
.tour-progress { display: flex; gap: 4px; margin: 12px 0 10px; }
.tour-progress span { flex: 1; height: 4px; border-radius: 2px; background: #e2e8f0; }
.tour-progress span.done { background: #003951; }
.tour-progress span.now { background: #ED880E; }
.tour-ui .tour-title {
    font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--stas-primary); margin: 0 0 6px; line-height: 1.3;
}
.tour-ui .tour-text { font-size: 14px; line-height: 1.45; color: #334155; margin: 0; }
.tour-wait {
    display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 9px;
    background: #f1f5f9; color: #475569; font-size: 13px; font-weight: 600;
}
.tour-wait i { color: #ED880E; }
.tour-wait.ok { background: var(--ok-bg); color: var(--ok); }
.tour-wait.ok i { color: #16855a; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }

/* Blazorise Button renders .btn: reset the Bootstrap look. */
.tour-ui .btn.tour-stop {
    margin-right: auto; border: 0; background: none; padding: 0 4px; height: 36px; box-shadow: none;
    color: #64748b; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px;
}
.tour-ui .btn.tour-stop:hover { color: #334155; }
.tour-ui .btn.tour-btn {
    height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 700; line-height: 1;
    display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--stas-border-strong);
    background: #fff; color: #003951; box-shadow: none;
}
.tour-ui .btn.tour-btn.primary { background: #003951; border-color: #003951; color: #fff; }
.tour-ui .btn.tour-btn.primary:disabled { background: #94a3b8; border-color: #94a3b8; color: #fff; opacity: 1; }
.tour-ui .btn.tour-btn.accent { background: #ED880E; border-color: #ED880E; color: #3f2600; }
.tour-ui .btn.tour-btn:focus-visible,
.tour-ui .btn.tour-stop:focus-visible { outline: 3px solid rgba(237, 136, 14, .55); outline-offset: 2px; }

/* End of a guide, and a step the role cannot see */
.tour-done { text-align: center; padding: 22px 20px 18px; width: 400px; }
.tour-done .tour-progress { margin-top: 0; }
.tour-done-ico {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--ok-bg); color: #16855a;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.tour-done-ico.blocked { background: var(--stas-bg-muted); color: #64748b; }
.tour-ui.tour-done .tour-title { font-size: 22px; }
.tour-done .tour-foot { flex-direction: column; align-items: stretch; }
.tour-ui.tour-done .btn.tour-btn { justify-content: center; height: 42px; font-size: 14.5px; }
.tour-ui.tour-done .btn.tour-stop { margin: 0 auto; }

/* Paused: a bar without the dim, the app stays usable */
.tour-paused {
    position: fixed; z-index: 1101; right: 24px; bottom: 24px; max-width: 680px; display: flex; align-items: center;
    gap: 14px; padding: 12px 14px 12px 16px; background: #0f2836; color: #fff; border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 25, 36, .35);
}
.tour-paused .tp-ico {
    width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(237, 136, 14, .18); color: #f5a54a;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tour-paused .tp-text { flex: 1; min-width: 0; line-height: 1.35; }
.tour-paused .tp-text strong { display: block; font-size: 15px; }
.tour-paused .tp-text small { display: block; color: #b9c7d3; font-size: 13px; }
.tour-ui.tour-paused .btn.tour-btn { height: 40px; }
.tour-ui.tour-paused .btn.tour-btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }

/* ── phone (≤ 640 px): the bubble is a sheet along the bottom edge (or the top one when the element is low) ── */
@media (max-width: 640px) {
    .um-text a.um-tour { flex-wrap: wrap; }
    .um-tour-btn { flex: 1 1 100%; justify-content: center; height: 50px; font-size: 17px; }

    .tour-bubble[data-place="sheet"],
    .tour-bubble[data-place="sheet-top"] {
        left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-width: none; border-radius: 16px; padding: 16px;
    }
    .tour-bubble[data-place="sheet-top"] { top: 8px; bottom: auto; }
    .tour-bubble[data-place^="sheet"] .tour-title { font-size: 18px; }
    .tour-bubble[data-place^="sheet"] .tour-text { font-size: 15px; }
    .tour-ui.tour-bubble[data-place^="sheet"] .btn.tour-btn { height: 44px; font-size: 15px; }
    .tour-bubble.tour-done[data-place="center"] { width: auto; left: 8px; right: 8px; top: auto; bottom: 8px; transform: none; }
    .tour-paused { left: 8px; right: 8px; bottom: 8px; max-width: none; flex-wrap: wrap; }
    .tour-paused .tp-text { flex: 1 1 calc(100% - 60px); }
    .tour-ui.tour-paused .btn.tour-btn { flex: 1; justify-content: center; height: 46px; font-size: 15px; }
}
