/* Първи стъпки (10.10.2026): лентата най-горе в съдържанието + диалогът за категориите.
   JS: assets/js/components/onboarding.js */

/* ---- лентата */
.ob-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 12px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2b1f17, #3d2c20);
    color: #f6ede1;
    box-shadow: 0 6px 20px rgba(43, 31, 23, .22);
}
.ob-bar[hidden] { display: none; }
.ob-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ob-title { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.ob-title i { color: #d4a574; }
.ob-count { font-size: .78rem; color: #cdb79d; font-weight: 600; }
.ob-x {
    margin-left: auto;
    width: 32px; height: 32px; min-height: 0; padding: 0;
    border: 0; border-radius: 9px; background: rgba(255, 255, 255, .08); color: #f6ede1; cursor: pointer;
}
.ob-steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; flex: 1 1 auto; }
.ob-steps li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 11px 5px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, .07); font-size: .84rem; color: #cdb79d;
}
.ob-steps li.is-next { background: rgba(212, 165, 116, .22); color: #fff; font-weight: 700; }
.ob-steps li.is-done { color: #9fd3a8; }
.ob-dot {
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 255, 255, .12); font-size: .72rem; font-weight: 700;
}
.ob-steps li.is-done .ob-dot { background: #3f8f55; color: #fff; }
.ob-steps li.is-next .ob-dot { background: #d4a574; color: #2b1f17; }
.ob-cta {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
    border: 0; border-radius: 12px; background: #d4a574; color: #2b1f17; font: inherit; font-weight: 700; cursor: pointer;
}
.ob-cta:hover { background: #e0b585; }
.ob-cta.ghost { background: rgba(255, 255, 255, .1); color: #f6ede1; }
.ob-cta.ghost:hover { background: rgba(255, 255, 255, .18); }
@media (max-width: 720px) {
    .ob-bar { padding: 12px; gap: 10px; }
    .ob-head { width: 100%; }
    .ob-steps { width: 100%; }
    .ob-steps li { font-size: .78rem; padding-right: 9px; }
    .ob-cta { width: 100%; justify-content: center; min-height: 46px; }
}

/* бутонът, към който сочим (Печат) */
.ob-pulse { animation: obPulse 1.2s ease-in-out 5; }
@keyframes obPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 165, 116, .7); }
    50% { box-shadow: 0 0 0 10px rgba(212, 165, 116, 0); }
}
@media (prefers-reduced-motion: reduce) { .ob-pulse { animation: none; outline: 3px solid #d4a574; } }

/* ---- диалогът */
body.ob-dlg-open { overflow: hidden; }
.ob-dlg {
    position: fixed; inset: 0; z-index: 1250;
    display: grid; place-items: center; padding: 16px;
    background: rgba(24, 16, 10, .55);
}
.ob-box {
    position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto;
    padding: 26px 24px 20px; border-radius: 18px; background: #fff; color: #2b231d;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.ob-x2 {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; min-height: 0; padding: 0;
    border: 0; border-radius: 10px; background: #f7f1ea; color: #6d5a48; cursor: pointer;
}
.ob-ic {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
    background: #f3e6d6; color: #a8743f; font-size: 1.15rem;
}
.ob-ic.ok { background: #e3f3e7; color: #2f7d46; }
.ob-box h2 { margin: 12px 0 6px; font-size: 1.25rem; line-height: 1.25; }
.ob-box p { margin: 0 0 14px; font-size: .93rem; line-height: 1.5; color: #4a3d32; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ob-chip {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
    border: 1.5px solid #e6d4bf; border-radius: 999px; background: #fff; color: #5a4a3a;
    font: inherit; font-weight: 600; cursor: pointer;
}
.ob-chip i { font-size: .72rem; opacity: 0; width: 0; transition: opacity .12s, width .12s; }
.ob-chip.is-on { background: #2b1f17; border-color: #2b1f17; color: #fff; }
.ob-chip.is-on i { opacity: 1; width: 12px; }
.ob-add { display: flex; gap: 8px; margin: 0 0 6px; }
.ob-add input {
    flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px;
    border: 1px solid #e6d4bf; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: #2b231d;
}
.ob-err { margin: 6px 0 0; color: #b3261e; font-size: .85rem; }
.ob-err[hidden] { display: none; }
.ob-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.ob-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
    border: 0; border-radius: 12px; background: #2b1f17; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.ob-btn.ghost { background: #f3e6d6; color: #5a3d1f; }
.ob-btn[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 480px) {
    .ob-foot .ob-btn { flex: 1 1 100%; }
}

/* ---- стъпките в лентата са бутони */
.ob-step {
    display: inline-flex; align-items: center; gap: 7px; min-height: 0; padding: 0; margin: 0;
    border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; cursor: pointer;
}
.ob-steps li:hover { background: rgba(255, 255, 255, .13); }
.ob-steps li.is-next:hover { background: rgba(212, 165, 116, .32); }

/* ---- илюстрациите (макет docs/mockups/onboarding-scenes-2.html, посока Б) */
.ob-scene {
    position: relative; height: 150px; margin: 0 0 14px; border-radius: 14px; overflow: hidden; cursor: pointer;
    background: linear-gradient(160deg, #fbf3e8, #f3e6d6);
}
.ob-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ob-box h2 .ob-n {
    display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%;
    background: #2b1f17; color: #fff; font-size: .78rem; vertical-align: 2px;
}
.ob-done { margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: #e3f3e7; color: #2f7d46; font-size: .75rem; font-weight: 700; }

/* само transform и opacity; имената са с представка, в таблото вече има свои pop/bob/rise */
.ob-scene.play .a { animation: var(--an) var(--dur, .5s) cubic-bezier(.2, .9, .25, 1.2) var(--d, 0s) both; }
.ob-scene .ob-bobbing { animation: ob-bob 2.6s ease-in-out infinite; }
@keyframes ob-pop   { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes ob-slide { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ob-rise  { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ob-tick  { from { opacity: 0; transform: scale(0) rotate(-40deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes ob-out   { from { opacity: 0; transform: translateY(34px); } 30% { opacity: 1; } to { opacity: 1; transform: translateY(0); } }
@keyframes ob-bob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
    .ob-scene.play .a, .ob-scene .ob-bobbing { animation: none !important; opacity: 1 !important; transform: none !important; }
}
@media (max-height: 640px) { .ob-scene { height: 110px; } }

/* ---- водач по полетата (coach): едно поле на фокус, следващите притъмнени */
.ob-tip {
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 14px;
    border-radius: 14px; background: #2b1f17; color: #f6ede1; font-size: .9rem; line-height: 1.4;
    box-shadow: 0 6px 18px rgba(43, 31, 23, .25); position: relative; animation: obTipIn .35s ease both;
}
.ob-tip::after {
    content: ''; position: absolute; left: 28px; bottom: -6px; width: 12px; height: 12px;
    background: #2b1f17; transform: rotate(45deg);
}
.ob-tip-n { flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: #d4a574; color: #2b1f17; font-weight: 800; }
.ob-tip-n small { font-size: .65rem; font-weight: 700; opacity: .7; }
.ob-tip-t { flex: 1 1 auto; min-width: 0; }
.ob-tip-t b { color: #e8c79c; }
.ob-tip-t em { font-style: normal; font-weight: 700; color: #9fd3a8; margin-left: 4px; }
.ob-tip-skip {
    flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px;
    background: rgba(255, 255, 255, .12); color: #f6ede1; font: inherit; font-weight: 600; cursor: pointer;
}
.ob-tip-skip:hover { background: rgba(255, 255, 255, .2); }
.ob-focus { outline: 2px solid #d4a574; outline-offset: 6px; border-radius: 12px; animation: obRing 1.6s ease-in-out infinite; }
.ob-future { opacity: .4; transition: opacity .3s; }
@keyframes obTipIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes obRing { 0%, 100% { outline-color: rgba(212, 165, 116, .95); } 50% { outline-color: rgba(212, 165, 116, .35); } }
@media (max-width: 560px) {
    .ob-tip { flex-wrap: wrap; }
    .ob-tip-skip { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ob-tip, .ob-focus { animation: none; } }

/* ---- два равностойни пътя (ръчно / ИИ) + „По-късно“ като тих линк */
.ob-choice { display: flex; gap: 10px; margin-top: 18px; }
.ob-choice .ob-btn { flex: 1 1 0; gap: 9px; min-height: 52px; padding: 0 14px; }
.ob-btn.ai { background: linear-gradient(135deg, #d4a574, #e8c79c); color: #2b1f17; box-shadow: 0 4px 14px rgba(212, 165, 116, .45); }
.ob-btn.ai:hover { filter: brightness(1.05); }
.ob-later { display: block; margin: 12px auto 0; padding: 6px 10px; border: 0; background: none; color: #8a7360; font: inherit; font-size: .88rem; cursor: pointer; }
.ob-later:hover { color: #2b1f17; text-decoration: underline; }
@media (max-width: 480px) { .ob-choice { flex-direction: column; } }
.ob-x2 { z-index: 3; }
.ob-empty-choice { max-width: 440px; margin: 18px auto 0; }

/* На десктоп лентата е продължение на картата (табове -> лента -> тяло), без свои заоблени ръбове */
@media (min-width: 769px) {
    body:is([data-tab="statistics"], [data-tab="articles"], [data-tab="designs"], [data-tab="venues"], [data-tab="menu-templates"]) .ob-bar {
        border-radius: 0; margin-bottom: 0; box-shadow: none; padding: 12px 24px;
    }
}
