/* Einfuehrungs-Assistent (tour.js) – Hanemann CD */

.tour-root {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.tour-root[hidden],
.tour-menu[hidden] {
    display: none;
}

.tour-shade,
.tour-lid {
    position: fixed;
    pointer-events: auto;
}

.tour-shade {
    background: rgba(46, 47, 49, 0.55);
}

.tour-lid {
    background: transparent;
    cursor: default;
}

.tour-ring {
    position: fixed;
    border: 2px solid var(--brand-red);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 4px rgba(226, 0, 26, 0.18);
    pointer-events: none;
    transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.tour-ring.is-pulse {
    animation: tour-pulse 1.4s ease-in-out infinite;
}

.tour-bubble {
    position: fixed;
    width: min(360px, calc(100vw - 24px));
    padding: 0.9rem 1rem 0.85rem;
    border-top: 4px solid var(--brand-red);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(46, 47, 49, 0.28);
    pointer-events: auto;
    transition: left 180ms ease, top 180ms ease;
}

.tour-bubble.is-centered {
    width: min(440px, calc(100vw - 24px));
}

.tour-bubble.is-nudged {
    animation: tour-nudge 320ms ease;
}

.tour-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tour-counter {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tour-close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: transparent;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.tour-close:hover {
    color: var(--ink);
    background: #f0f0f1;
}

.tour-bubble-title {
    margin: 0.2rem 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.tour-bubble-text {
    margin: 0;
    font-size: 0.92rem;
}

.tour-bubble-hint {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.tour-bubble-hint[hidden] {
    display: none;
}

.tour-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0.75rem 0 0;
}

.tour-dots span {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
}

.tour-dots span.is-done {
    background: var(--brand-gray);
}

.tour-dots.is-bar {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
}

.tour-dots .tour-bar {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--brand-red);
    transition: width 180ms ease;
}

.tour-menu-item.is-full {
    margin-bottom: 0.35rem;
    border: 1px solid var(--brand-red);
}

.tour-dots span.is-current {
    background: var(--brand-red);
}

.tour-bubble-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tour-bubble-actions .button {
    min-height: 34px;
    padding: 0.35rem 0.85rem;
}

.tour-bubble-actions .button[hidden] {
    display: none;
}

.tour-skip {
    margin-right: auto;
}

/* Hilfe-Knopf oben rechts */

.tour-help-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
}

.tour-help-button:hover,
.tour-help-button[aria-expanded="true"] {
    border-color: var(--brand-red);
    background: var(--brand-red-soft);
}

.tour-help-mark {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--brand-red);
    font-size: 0.85rem;
    font-weight: 700;
}

.tour-help-button.is-new::after {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand-red);
    content: "";
}

.tour-menu {
    position: fixed;
    z-index: 1500;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand-red);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.tour-menu-head {
    display: grid;
    padding: 0.4rem 0.5rem 0.6rem;
}

.tour-menu-head .muted {
    color: var(--muted);
    font-size: 0.8rem;
}

.tour-menu-list {
    display: grid;
    gap: 2px;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
}

.tour-menu-item {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.tour-menu-item:hover,
.tour-menu-item:focus-visible {
    background: #f0f0f1;
}

.tour-menu-item.is-here {
    margin-bottom: 0.35rem;
    background: var(--brand-red-soft);
}

.tour-menu-copy {
    display: grid;
}

.tour-menu-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.tour-menu-check {
    display: inline-grid;
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    place-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    font-size: 0.75rem;
}

.tour-menu-check.is-done {
    border-color: var(--green-700);
    color: #fff;
    background: var(--green-700);
}

.tour-menu-reset {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
}

.tour-menu-reset:hover {
    color: var(--ink);
}

/* Angebot beim ersten Anmelden */

.tour-offer {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1900;
    width: min(380px, calc(100vw - 32px));
    padding: 1rem 1.1rem 0.9rem;
    border-top: 4px solid var(--brand-red);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(46, 47, 49, 0.28);
    animation: tour-rise 260ms ease;
}

.tour-offer h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.tour-offer p {
    margin: 0;
    font-size: 0.9rem;
}

.tour-offer-logo {
    float: right;
    width: 40px;
    height: auto;
    margin: 0 0 0.4rem 0.6rem;
}

@media (max-width: 720px) {
    .tour-help-label {
        display: none;
    }

    .tour-help-button {
        padding-right: 0.3rem;
    }

    .tour-offer {
        right: 16px;
        bottom: 16px;
    }
}

@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(226, 0, 26, 0.18); }
    50% { box-shadow: 0 0 0 9px rgba(226, 0, 26, 0.10); }
}

@keyframes tour-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@keyframes tour-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .tour-ring,
    .tour-bubble,
    .tour-offer {
        transition: none;
        animation: none;
    }
}
