/**
 * Умный подбор букета
 */

.smart-picker-page {
    padding-bottom: 64px;
    background: var(--gray-50);
}

.smart-picker-page > .container {
    max-width: 1320px;
}

.smart-picker-breadcrumb {
    padding-top: 16px;
    margin-bottom: 20px;
}

.smart-picker-breadcrumb .breadcrumb {
    margin-bottom: 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.smart-picker-breadcrumb .breadcrumb-item a {
    color: var(--gray-600);
    text-decoration: none;
}

.smart-picker-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* Hero */

.smart-picker-hero {
    margin-bottom: 24px;
    padding: 28px 28px 24px;
    background: linear-gradient(165deg, #ffffff 0%, #fff8fb 48%, #ffeff5 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow-sm);
    overflow: hidden;
    position: relative;
}

.smart-picker-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 92% 8%, rgba(255, 107, 157, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 4% 92%, rgba(99, 102, 241, 0.06) 0%, transparent 38%);
    pointer-events: none;
}

.smart-picker-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;
}

@media (min-width: 768px) {
    .smart-picker-hero__inner {
        grid-template-columns: auto 1fr;
        gap: 24px;
    }
}

.smart-picker-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 107, 157, 0.12);
    color: var(--primary-color);
    border-radius: 16px;
    font-size: 28px;
}

.smart-picker-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.smart-picker-hero__title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.smart-picker-hero__lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--gray-600);
    max-width: 640px;
}

.smart-picker-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.smart-picker-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
}

.smart-picker-hero__stat i {
    font-size: 16px;
    color: var(--primary-color);
}

/* Layout */

.smart-picker-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 992px) {
    .smart-picker-layout {
        grid-template-columns: minmax(320px, 400px) 1fr;
        gap: 28px;
    }
}

/* Form panel */

.smart-picker-form-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow-sm);
    padding: 24px;
}

@media (min-width: 992px) {
    .smart-picker-form-panel {
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 112px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.smart-picker-form-panel__head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.smart-picker-form-panel__head h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.smart-picker-form-panel__head p {
    margin: 0;
    font-size: 14px;
    color: var(--gray-600);
}

.smart-picker-live-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: var(--border-radius-lg);
    border: 1px dashed var(--gray-300);
    background: var(--gray-50);
    min-height: 48px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.smart-picker-live-summary:not(.empty) {
    border-style: solid;
    border-color: rgba(255, 107, 157, 0.25);
    background: rgba(255, 107, 157, 0.06);
}

.smart-picker-summary-chip {
    background: #fff;
    color: var(--gray-800);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--gray-200);
}

.smart-picker-summary-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--chip-color, var(--primary-color));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
}

.smart-picker-group {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--gray-100);
}

.smart-picker-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.smart-picker-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.smart-picker-group-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.12);
    border-radius: 8px;
}

.smart-picker-group-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-900);
}

.smart-picker-group-hint {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.smart-picker-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.smart-picker-toggle:hover {
    color: var(--primary-color);
}

.smart-picker-toggle i {
    font-size: 18px;
    line-height: 1;
}

.smart-picker-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-picker-option {
    position: relative;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-800);
    border-radius: var(--border-radius-lg);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    min-height: 44px;
    flex: 1 1 calc(50% - 8px);
}

.smart-picker-option:hover,
.smart-picker-option:focus-visible {
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(255, 107, 157, 0.12);
    outline: none;
}

.smart-picker-option.active {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.08);
    color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.15);
}

.smart-picker-option.pulse {
    animation: pickerPulse 0.32s ease;
}

@keyframes pickerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.smart-picker-option-color {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 100%;
}

.smart-picker-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--option-color, #ff6b9d);
    border: 2px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.smart-picker-option-color.active .smart-picker-color-dot {
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.25);
}

.smart-picker-help {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    color: var(--gray-600);
}

.smart-picker-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-picker-form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--border-radius-lg);
}

/* Results */

.smart-picker-results-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow-sm);
    padding: 24px;
    min-height: 320px;
}

.smart-picker-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.smart-picker-results-head h2 {
    margin: 0 0 4px;
    font-size: clamp(20px, 2.5vw, 24px);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.smart-picker-results-head p {
    margin: 0;
    font-size: 14px;
    color: var(--gray-600);
}

.smart-picker-results-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
    border-radius: 999px;
}

.smart-picker-results-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.smart-picker-results-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
}

.smart-picker-page .products-grid {
    gap: 20px;
}

.smart-picker-empty,
.smart-picker-welcome {
    text-align: center;
    padding: 40px 24px;
}

.smart-picker-welcome__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    font-size: 36px;
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
    border-radius: 20px;
}

.smart-picker-welcome h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.smart-picker-welcome p {
    margin: 0 auto 24px;
    max-width: 400px;
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.55;
}

.smart-picker-steps {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 360px;
    text-align: left;
    counter-reset: none;
}

.smart-picker-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.smart-picker-steps li:last-child {
    border-bottom: none;
}

.smart-picker-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.12);
    border-radius: 8px;
}

.smart-picker-empty i {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.smart-picker-empty p {
    max-width: 420px;
    margin: 0 auto 20px;
    color: var(--gray-600);
}

.smart-picker-results-footer {
    margin-top: 28px;
    text-align: center;
}

.smart-picker-results-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Mobile sticky submit */

.smart-picker-mobile-bar {
    display: none;
}

@media (max-width: 991px) {
    .smart-picker-form-panel {
        padding: 20px 18px;
    }

    .smart-picker-results-panel {
        padding: 20px 18px;
    }

    .smart-picker-option {
        flex: 1 1 100%;
    }

    .smart-picker-page .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .smart-picker-mobile-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(10px);
    }

    .smart-picker-mobile-bar .btn {
        flex: 1;
        font-weight: 600;
        padding: 12px 16px;
        border-radius: var(--border-radius-lg);
    }

    .smart-picker-page {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .smart-picker-form-actions--desktop {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .smart-picker-mobile-bar {
        display: none !important;
    }
}

/* Dark theme */

[data-theme="dark"] .smart-picker-hero {
    background: linear-gradient(165deg, #1a1d2e 0%, #1f2438 50%, #2a1f2e 100%);
    border-color: var(--gray-700);
}

[data-theme="dark"] .smart-picker-hero__title,
[data-theme="dark"] .smart-picker-form-panel__head h2,
[data-theme="dark"] .smart-picker-results-head h2,
[data-theme="dark"] .smart-picker-group-title,
[data-theme="dark"] .smart-picker-welcome h3 {
    color: #fff;
}

[data-theme="dark"] .smart-picker-form-panel,
[data-theme="dark"] .smart-picker-results-panel {
    background: #1a1d2e;
    border-color: var(--gray-700);
}

[data-theme="dark"] .smart-picker-option {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--gray-100);
}

[data-theme="dark"] .smart-picker-option.active {
    background: rgba(255, 107, 157, 0.2);
    color: #fff;
}

[data-theme="dark"] .smart-picker-live-summary {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme="dark"] .smart-picker-summary-chip {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--gray-100);
}

[data-theme="dark"] .smart-picker-mobile-bar {
    background: rgba(26, 29, 46, 0.96);
    border-color: var(--gray-700);
}
