/* Uygulama ici rehber (js/app-tour.js).
   Katman: pencereler (10050-100000) ve studyo kabugunun (9999) ustunde; bildirimlerin
   (toast, 999999) altinda ki rehber acikken gelen uyari okunabilsin.
   Yalniz transform/opacity animasyonu; backdrop-filter ve blur YOK (yayin sirasinda GPU). */
.atr {
    position: fixed; inset: 0; z-index: 200000;
    pointer-events: none;
    transition: opacity .16s ease;
}
.atr--idle { opacity: 0; }
.atr--still .atr-card, .atr--still .atr-ring { transition: none; }
.atr--idle .atr-dim__p, .atr--idle .atr-card { pointer-events: none; }

.atr-dim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.atr-dim__p { fill: rgba(6, 6, 14, .62); fill-rule: evenodd; pointer-events: auto; cursor: default; }

.atr-ring {
    position: absolute; left: 0; top: 0;
    border-radius: 10px;
    box-shadow: 0 0 0 2px var(--atl-accent, #7c5cff);
    pointer-events: none;
    transition: transform .22s ease;
}
.atr-ring[hidden] { display: none; }
.atr-ring--press::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 2px var(--atl-accent, #7c5cff);
    animation: atr-pulse 1.3s ease-out infinite;
}
@keyframes atr-pulse {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.14); opacity: 0; }
}

.atr-card {
    position: absolute; left: 0; top: 0;
    width: min(340px, calc(100vw - 24px));
    padding: 14px 16px 12px;
    border: 1px solid var(--atl-line, rgba(127, 127, 140, .25));
    border-radius: 16px;
    background: var(--atl-surface-0, #fff);
    color: var(--atl-ink, #15151f);
    box-shadow: 0 16px 40px rgba(6, 6, 14, .32);
    font-family: var(--atl-font-body, 'Manrope', system-ui, sans-serif);
    pointer-events: auto;
    outline: none;
    transition: transform .22s ease;
}
.atr-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.atr-card__count {
    font-size: 12px; font-weight: 600; color: var(--atl-mute, #6c6c7c);
    direction: ltr; unicode-bidi: isolate;
}
.atr-card__title { margin: 0 0 4px; font-size: 16px; line-height: 1.3; font-weight: 700; color: var(--atl-ink, #15151f); }
.atr-card__body { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--atl-ink-soft, var(--atl-ink, #33333f)); }
.atr-card__press {
    display: flex; align-items: center; gap: 7px; margin: 8px 0 0;
    font-size: 13px; font-weight: 700; color: var(--atl-accent, #7c5cff);
}
.atr-card__press[hidden] { display: none; }
.atr-card__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.atr-btn {
    min-height: 34px; padding: 6px 14px; border-radius: 999px;
    border: 1px solid var(--atl-line, rgba(127, 127, 140, .25));
    background: transparent; color: var(--atl-ink, #15151f);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.atr-btn:hover { background: var(--atl-surface-2, rgba(127, 127, 140, .12)); }
.atr-btn[hidden] { display: none; }
.atr-btn--primary { border-color: transparent; background: var(--atl-accent, #7c5cff); color: var(--atl-accent-ink, #fff); }
.atr-btn--primary:hover { background: var(--atl-accent, #7c5cff); opacity: .9; }
.atr-btn:focus-visible, .atr-x:focus-visible, .atr-ch:focus-visible { outline: 2px solid var(--atl-accent, #7c5cff); outline-offset: 2px; }

.atr-x {
    width: 28px; height: 28px; flex: none; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--atl-mute, #6c6c7c);
    font-size: 15px; cursor: pointer;
}
.atr-x:hover { background: var(--atl-surface-2, rgba(127, 127, 140, .12)); color: var(--atl-ink, #15151f); }

/* ---- "Nasil kullanilir?" paneli ---- */
.atr-panelwrap {
    position: fixed; inset: 0; z-index: 200001;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(6, 6, 14, .58);
    font-family: var(--atl-font-body, 'Manrope', system-ui, sans-serif);
}
.atr-panel {
    position: relative; width: 100%; max-width: 520px;
    max-height: calc(100vh - 32px); overflow-y: auto;
    padding: 22px 20px 16px;
    border: 1px solid var(--atl-line, rgba(127, 127, 140, .25));
    border-radius: 20px;
    background: var(--atl-surface-0, #fff);
    color: var(--atl-ink, #15151f);
    box-shadow: 0 24px 60px rgba(6, 6, 14, .34);
    animation: atr-in .2s ease;
}
@keyframes atr-in {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to { opacity: 1; transform: none; }
}
.atr-panel__x { position: absolute; top: 12px; inset-inline-end: 12px; }
.atr-panel__title { margin-block: 0 4px; margin-inline: 0 34px; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--atl-ink, #15151f); }
.atr-panel__sub { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--atl-mute, #6c6c7c); }
.atr-panel__list { display: flex; flex-direction: column; gap: 6px; }

.atr-ch {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px 12px; text-align: start;
    border: 1px solid var(--atl-line, rgba(127, 127, 140, .25));
    border-radius: 14px;
    background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.atr-ch:hover:not([disabled]) { background: var(--atl-surface-2, rgba(127, 127, 140, .12)); }
.atr-ch[disabled] { opacity: .5; cursor: default; }
.atr-ch__ic {
    width: 34px; height: 34px; flex: none; display: grid; place-items: center;
    border-radius: 50%; font-size: 14px;
    background: var(--atl-surface-2, rgba(127, 127, 140, .12));
    color: var(--atl-accent, #7c5cff);
}
.atr-ch.is-done .atr-ch__ic { background: var(--atl-accent, #7c5cff); color: var(--atl-accent-ink, #fff); }
.atr-ch__main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.atr-ch__main b { font-size: 14px; line-height: 1.3; font-weight: 700; }
.atr-ch__main small { font-size: 12.5px; line-height: 1.35; color: var(--atl-mute, #6c6c7c); }
.atr-ch__act { flex: none; font-size: 12.5px; font-weight: 700; color: var(--atl-accent, #7c5cff); }

/* Koyu temada zemin (surface-0) karartmayla neredeyse ayni siyah: kart ayrilsin. */
body.dark-mode .atr-card, body.dark-mode .atr-panel { background: #17171f; }

@media (max-width: 560px) {
    .atr-panelwrap { align-items: flex-end; padding: 0; }
    .atr-panel {
        max-width: none; max-height: 88vh;
        border-radius: 20px 20px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .atr, .atr-ring, .atr-card { transition: none; }
    .atr-ring--press::after, .atr-panel { animation: none; }
}
