/* =========================================
   Нижняя плашка-шторка «Ассистент Колориста»
   ========================================= */

:root {
    --ac-guide-accent-start: #6366f1;
    --ac-guide-accent-end: #7c5ce6;
    --ac-guide-text-dark: #141522;
    --ac-guide-text-muted: #5a6075;
    --ac-guide-badge-bg: #eef0ff;
    --ac-guide-badge-text: #5652d6;
    --ac-guide-border: #e8eaf6;
}

/* --- Свернутая нижняя плашка --- */
.ac-guide-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translate(-50%, 140%);
    width: calc(100% - 24px);
    max-width: 680px;
    background: #ffffff;
    border: 1px solid var(--ac-guide-border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(20, 21, 34, 0.12), 0 2px 8px rgba(99, 102, 241, 0.08);
    z-index: 9990;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
    font-family: inherit;
    box-sizing: border-box;
}

.ac-guide-bar.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.ac-guide-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.ac-guide-bar__content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.ac-guide-bar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--ac-guide-badge-bg);
    font-size: 20px;
    flex-shrink: 0;
}

.ac-guide-bar__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ac-guide-bar__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ac-guide-text-dark);
    line-height: 1.25;
}

.ac-guide-bar__subtitle {
    font-size: 12px;
    color: var(--ac-guide-text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.ac-guide-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ac-guide-bar__btn {
    border: none;
    background: linear-gradient(135deg, var(--ac-guide-accent-start) 0%, var(--ac-guide-accent-end) 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ac-guide-bar__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.36);
}

.ac-guide-bar__close {
    border: none;
    background: transparent;
    color: #9499ad;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
}

.ac-guide-bar__close:hover {
    background: #f3f4fa;
    color: var(--ac-guide-text-dark);
}

/* --- Затемнение фона --- */
.ac-guide-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 21, 34, 0.45);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ac-guide-backdrop.is-open {
    opacity: 1;
}

/* --- Выезжающая шторка --- */
.ac-guide-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(20, 21, 34, 0.18);
    z-index: 9999;
    padding: 12px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: inherit;
}

.ac-guide-sheet.is-open {
    transform: translate(-50%, 0);
}

.ac-guide-sheet__handle {
    width: 40px;
    height: 4px;
    background: #dde0ee;
    border-radius: 99px;
    margin: 0 auto 14px;
}

.ac-guide-sheet__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: #f4f5fb;
    color: #5a6075;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.ac-guide-sheet__close:hover {
    background: #e8eaf6;
    color: var(--ac-guide-text-dark);
}

.ac-guide-sheet__body--center {
    text-align: center;
    padding-top: 12px;
}

.ac-guide-sheet__badge {
    display: inline-block;
    background: var(--ac-guide-badge-bg);
    color: var(--ac-guide-badge-text);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 99px;
    margin-bottom: 12px;
}

.ac-guide-sheet__title {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--ac-guide-text-dark);
    padding-right: 28px;
}

.ac-guide-sheet__body--center .ac-guide-sheet__title {
    padding-right: 0;
}

.ac-guide-sheet__lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ac-guide-text-muted);
}

.ac-guide-sheet__list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ac-guide-sheet__list li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ac-guide-text-dark);
}

.ac-guide-sheet__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ac-guide-accent-start);
    font-weight: 800;
    font-size: 15px;
}

.ac-guide-sheet__cta {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--ac-guide-accent-start) 0%, var(--ac-guide-accent-end) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ac-guide-sheet__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}

.ac-guide-sheet__cta--secondary {
    background: #eef0ff;
    color: var(--ac-guide-badge-text);
    box-shadow: none;
}

.ac-guide-sheet__cta--secondary:hover {
    background: #e1e4ff;
    box-shadow: none;
}

.ac-guide-sheet__note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: #7c8299;
}

/* --- Адаптация под мобильные экраны --- */
@media (max-width: 600px) {
    .ac-guide-bar {
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        transform: translateY(110%);
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .ac-guide-bar.is-visible {
        transform: translateY(0);
    }

    .ac-guide-bar__inner {
        padding: 10px 12px;
        gap: 8px;
    }

    .ac-guide-bar__icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .ac-guide-bar__title {
        font-size: 13px;
    }

    .ac-guide-bar__subtitle {
        font-size: 11px;
    }

    .ac-guide-bar__btn {
        font-size: 12px;
        padding: 8px 11px;
    }

    .ac-guide-sheet {
        padding: 12px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .ac-guide-sheet__title {
        font-size: 18px;
    }
}