/* CSS переменные */
:root {
    --slider-offset: 100px;

    /* Размеры элементов */
    --card-width: min(35vw, 670px);
    --card-height: min(21.875vw, 422px);
    --background-diameter: min(43.75vw, 670px);
    --selector-diameter: min(52.5vw, 770px); /* +100px от фона */

    /* Пропорции для расчетов */
    --card-aspect-ratio: 0.629; /* 422/670 */
    --background-to-card-ratio: 1; /* 670/670 */
}

/* Полноэкранный попап */
.wizard-popup {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s 0.4s; /* visibility меняется после анимации */
    transform: translateX(100%);
    visibility: hidden;
}

/* Скрытие визардов по умолчанию */
.wizard-popup.web {
    display: block;
}

.wizard-popup.mob {
    display: none;
}

/* На мобильных показываем .mob, скрываем .web */
@media (max-width: 768px) {
    .wizard-popup.web {
        display: none !important;
    }
    
    .wizard-popup.mob {
        display: block !important;
    }
}

/* Состояние открытого попапа */
.wizard-popup.open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
    visibility: visible !important;
    transition-delay: 0s; /* Убираем delay при открытии */
}

/* Класс для блокировки прокрутки (устанавливается через JS) */
body.wizard-open,
html.wizard-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Базовые стили модального окна визарда - ТОЛЬКО для десктопа */
.wizard-popup.web .wizard-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: min(2vw, 2rem);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Левая панель шагов - ТОЛЬКО для десктопа */
.wizard-popup.web .wizard-steps {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(12vw, 160px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: none;
    z-index: 20;
    padding: min(2vw, 2rem) 0 min(2vw, 2rem) min(2vw, 2rem);
}

.wizard-popup.web .wizard-step-num {
    color: #000;
    font-size: min(4vw, 45px);
    font-weight: 500;
    letter-spacing: -0.2px;
    line-height: 1.1;
    position: relative;
    width: 100%;
    text-align: left;
    z-index: 1;
    margin: 0;
    padding: 0 0 2rem 0.5rem;
}

.wizard-popup.web .wizard-steps-list {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wizard-popup.web .wizard-steps-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.wizard-popup.web .wizard-step {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #bbb;
    padding-left: 24px;
    min-height: 32px;
    transition: color 0.2s;
    cursor: pointer;
}

.wizard-popup.web .wizard-step.done,
.wizard-popup.web .wizard-step.active {
    color: #000;
}

.wizard-popup.web .wizard-step .step-num-label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-right: 8px;
    color: inherit;
}

.wizard-popup.web .wizard-step .step-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: inherit;
}

.wizard-popup.web .step-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #000;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 1;
    transition: opacity 0.2s;
}

.wizard-popup.web .wizard-step.todo .step-dot {
    display: none;
}

/* Вертикальная линия между шагами */
.wizard-popup.web .wizard-steps-list ol::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #eee;
    z-index: 0;
}

.wizard-popup.web .wizard-step.done .step-dot,
.wizard-popup.web .wizard-step.active .step-dot {
    background: #000;
    opacity: 1;
}

.wizard-popup.web .wizard-step.todo {
    color: #bbb;
}

/* Анимация линии */
.wizard-popup.web .wizard-step.done .step-dot {
    box-shadow: 0 0 0 2px #0002;
}

/* Центральная область - ТОЛЬКО для десктопа */
.wizard-popup.web .wizard-content {
    --content-margin: min(12vw, 160px);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: min(2vw, 2rem);
    margin-left: var(--content-margin);
    width: calc(100% - var(--content-margin));
    position: relative;
}

/* Контент шагов визарда */
.wizard-popup.web .wizard-step-content {
    width: 100%;
}

/* Отдельные шаги */
.wizard-popup.web .step-content {
    width: 100%;
}

/* Контейнер круговых элементов - ТОЛЬКО для десктопа */
.wizard-popup.web .circular-elements {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(50vw, 650px);
    height: min(50vw, 650px);
    z-index: 1;
}

/* Конструктор дизайна - ТОЛЬКО для десктопа */
.wizard-popup.web .design-constructor {
    position: relative;
    width: 100%;
    max-width: 80vw;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}

/* Фон в виде круга (неизменный) - ТОЛЬКО для десктопа */
.wizard-popup.web .design-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--background-diameter);
    height: var(--background-diameter);
    border-radius: 50%;
    background-color: transparent;
    background-image: none;
    z-index: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Анимация для шага 3 - уменьшение и перемещение фонового круга */
.wizard-popup.web .design-background.step3-animation {
    transition-duration: 0.4s;
    transition-property: transform;
    transition-timing-function: ease-out;
    transform: translateX(-150%) translateY(-75%) scale(0.47);
}

/* Слой карты (меняется при выборе фона) - ТОЛЬКО для десктопа */
.wizard-popup.web .design-card {
    position: absolute;
    top: 50%;
    left: calc(50% + var(--slider-offset));
    transform: translate(-50%, -50%);
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 3;
    transition: background 0.3s ease,
        left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 100ms linear;
    transform-style: preserve-3d;
    will-change: transform;
    overflow: hidden;
}

/* Анимация для карты на шаге 3 */
.wizard-popup.web .design-card.step3-animation {
    will-change: transform;
    transition: transform 0.4s ease-out !important;
    transform: translate(-115%, -75%) perspective(1000px)
        rotateX(5deg) rotate(-12deg) rotateY(6deg)
        scale3d(0.6, 0.6, 0.6);
}

/* Отключаем hover эффекты на шаге 3 */
.wizard-popup.web .design-card.step3-animation:hover {
    transform: translate(-115%, -75%) perspective(1000px)
        rotateX(5deg) rotate(-12deg) rotateY(6deg)
        scale3d(0.6, 0.6, 0.6) !important;
}

/* Фиксированное изображение на карте - ТОЛЬКО для десктопа */
.wizard-popup.web .fixed-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}

.wizard-popup.web .fixed-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
}

/* Круговой селектор фонов - ТОЛЬКО для десктопа */
.wizard-popup.web .background-selector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(
        --selector-diameter
    ); /* Используем новую переменную */
    height: var(--selector-diameter);
    z-index: 2;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

/* Маркеры селектора фонов отключены */

.wizard-popup.web .background-selector:active {
    cursor: grabbing;
}

/* Фиксированное окошко выбора - ТОЛЬКО для десктопа */

.wizard-popup.web button.background-button {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.wizard-popup.web button.background-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: none;
    z-index: 1;
}

.wizard-popup.web button.background-button.active {
    border-color: #05005b;
    box-shadow: 0 0 0 4px rgba(5, 0, 91, 0.2);
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 1;
}

/* Контейнер для вращения фонов - ТОЛЬКО для десктопа */
.wizard-popup.web .backgrounds-container {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Контейнер слайдера - ТОЛЬКО для десктопа */
.wizard-popup.web .slider-wrapper {
    position: absolute;
    top: 50%;
    left: calc(50% + var(--slider-offset));
    transform: translate(-50%, -50%);
    width: var(--card-width); /* Такой же размер как карта */
    height: var(--card-height); /* Такой же размер как карта */
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-popup.web .slider-wrapper > * {
    pointer-events: auto;
}

/* Слайдер изображений - ТОЛЬКО для десктопа */
.wizard-popup.web .image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wizard-popup.web .slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wizard-popup.web .slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.wizard-popup.web .slider-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wizard-popup.web .slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

.wizard-popup.web .slide-image.fade-out {
    opacity: 0;
}

.wizard-popup.web .slide-image.fade-in {
    opacity: 1;
}

/* Миниатюры по бокам - ТОЛЬКО для десктопа */
.wizard-popup.web .side-thumbnails {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: min(10vw, 133px);
    height: min(10vw, 133px);
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wizard-popup.web .side-thumbnails:hover {
    transform: translateY(-50%) scale(1.05);
}

.wizard-popup.web .side-thumbnails.left {
    left: calc(-350px - var(--slider-offset));
}

.wizard-popup.web .side-thumbnails.right {
    right: calc(-350px + var(--slider-offset));
}

.wizard-popup.web .thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Навигационные стрелки - ТОЛЬКО для десктопа */
.wizard-popup.web button.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: min(3.5vw, 55px);
    height: min(3.5vw, 55px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px #0000000d;
}

.wizard-popup.web button.slider-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.wizard-popup.web button.slider-nav.prev {
    left: -107px;
    background: #fff;
}

.wizard-popup.web button.slider-nav.next {
    right: -107px;
    background: #fff;
}

.wizard-popup.web .slider-nav svg {
    width: 15px;
    height: 15px;
}

.wizard-popup.web .slider-nav svg path {
    stroke: #000;
    stroke-width: 1;
    fill: none;
}

/* Пагинация - ТОЛЬКО для десктопа */
.wizard-popup.web .slider-pagination {
    position: absolute;
    top: calc(50% + 220px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.wizard-popup.web .pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wizard-popup.web .pagination-dot.active {
    background: #05005b;
    transform: scale(1.2);
}

.wizard-popup.web .pagination-dot:hover {
    background: #333;
    transform: scale(1.1);
}

/* Верхняя строка мобильных - скрыта на десктопе */
.wizard-step-header-mobile {
    display: none;
}

/* Заголовок мобильного шага - скрыт на десктопе */
.step-title-mobile {
    display: none;
}

/* Кнопка "Назад" - скрыта на десктопе */
.wizard-popup .wizard-modal button.wizard-back {
    display: none;
}

/* Кнопка закрытия */
.wizard-popup .wizard-modal button.wizard-close {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    z-index: 9999;
    transition: all 0.2s ease;
    pointer-events: auto;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
}

/* Кнопка закрытия для веб версии */
.wizard-popup.web .wizard-modal button.wizard-close.web-close {
    display: flex;
}

.wizard-popup .wizard-modal button.wizard-close:hover {
    transform: scale(1.15);
}

.wizard-popup .wizard-modal button.wizard-close svg {
    width: 24px;
    height: 24px;
    stroke: #000;
    fill: none;
    pointer-events: none;
    display: block;
}

.wizard-popup .wizard-modal button.wizard-close svg path {
    stroke: #000;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
}

/* Круглая кнопка "далее" - ТОЛЬКО для .web визарда */
.wizard-popup.web .wizard-footer {
    position: fixed;
    right: 2.5rem;
    bottom: 2.5rem;
    z-index: 100;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    width: auto;
    background: none;
}

.wizard-popup.web button.wizard-next-btn {
    width: 170px !important;
    height: 170px !important;
    border-radius: 50% !important;
    background: #05005b !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, transform 0.2s !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    min-height: unset !important;
    font-size: 18px !important;
    color: #fff !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    font-family: "GraphikLCG", "Helvetica", "Arial", sans-serif !important;
}

.wizard-popup.web button.wizard-next-btn:hover {
    background: #06006e !important;
    transform: scale(1.04) !important;
}

.wizard-popup.web button.wizard-next-btn:disabled {
    background: #b3b3b3 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.wizard-popup.web button.wizard-next-btn:disabled:hover {
    background: #b3b3b3 !important;
    transform: none !important;
}

.wizard-popup.web .wizard-next-label {
    color: #fff;
    font-family: "GraphikLCG", "Helvetica", "Arial", sans-serif;
    font-weight: 500;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

/* Заголовок шага */
.step-title {
    text-align: center;
    margin-bottom: 2rem;
}

.step-title h2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

/* Селектор номиналов - ТОЛЬКО для десктопа */
.wizard-popup.web .amount-selector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(
        --selector-diameter
    ); /* Используем новую переменную */
    height: var(--selector-diameter);
    z-index: 2;
    pointer-events: auto;
    cursor: grab;
    display: none; /* Скрыт по умолчанию, чтобы избежать мелькания */
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Маркеры селектора номиналов отключены */

.wizard-popup.web .amount-selector:active {
    cursor: grabbing;
}

.wizard-popup.web .amount-selector > * {
    pointer-events: auto;
}

#amountsContainer {
    transition: transform 0.1s ease-out;
}

.wizard-popup.web .amounts-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Кнопки номиналов - ТОЛЬКО для десктопа */
.wizard-popup.web button.amount-button {
    position: absolute;
    width: auto;
    min-width: 60px;
    height: 28.5092px;
    border-radius: 14px;
    border: none;
    padding: 0 12px;
    white-space: nowrap;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px;
    overflow: hidden;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    touch-action: none;
    user-select: none;
}

.wizard-popup.web button.amount-button:hover {
    transform: scale(1.05);
    color: #c6b09f;
    z-index: 2;
}

.wizard-popup.web button.amount-button.active {
    background: transparent;
    color: #333;
    font-weight: 800;
    font-size: 13px;
    z-index: 2;
}

/* Отображение выбранного номинала */
.selected-amount-display {
    position: absolute;
    top: 50%;
    left: calc(50% + 430px);
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    opacity: 0;
}

@keyframes fadeInAmountDisplay {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.amount-button-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.amount-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.amount-currency {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.product-suggestion {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.suggestion-text {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.suggestion-separator {
    font-size: 14px;
    font-weight: 500;
    color: #999;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Форма для шага 3 */
.wizard-popup .recipient-form-container {
    position: static;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    opacity: 0;
    transform-origin: top center;
    transition: opacity 300ms ease, transform 300ms ease;
}

.wizard-popup .recipient-form-container.visible {
    opacity: 1;
}

.wizard-popup .recipient-form {
    background: none;
}

.wizard-popup .form-header {
    margin-bottom: 24px;
}

.wizard-popup .form-title {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-align: center;
}

.wizard-popup .form-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Скрываем старые телефонные поля на шаге 3 */
.wizard-popup .recipient-form-container .phone-field,
.wizard-popup .recipient-form-container .phone-field .field-hint {
    display: none !important;
}

/* Поля формы шага 3 - новый дизайн */
.wizard-popup .field-group {
    position: relative;
    margin-bottom: 24px;
    width: 100%;
}

.wizard-popup .field-label {
    position: absolute;
    top: 16px;
    left: 0;
    font-size: 18px;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: left top;
    z-index: 1;
}

.wizard-popup .field-label.focused {
    top: 0;
    font-size: 12px;
    color: #999;
    transform: translateY(-8px);
}

.wspfy-wizard .email-input,
.wspfy-wizard .text-input,
.wspfy-wizard .textarea-input {
    width: 100% !important;
    padding: 16px 0 8px 0 !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    font-size: 16px !important;
    outline: none !important;
    background: transparent !important;
    transition: border-color 0.2s ease !important;
}

.wspfy-wizard .email-input:focus,
.wspfy-wizard .text-input:focus,
.wspfy-wizard .textarea-input:focus {
    border-bottom-color: #000 !important;
}

.wspfy-wizard .email-input:focus + .field-label,
.wspfy-wizard .text-input:focus + .field-label,
.wspfy-wizard .textarea-input:focus + .field-label,
.wspfy-wizard .email-input:not(:placeholder-shown) + .field-label,
.wspfy-wizard .text-input:not(:placeholder-shown) + .field-label,
.wspfy-wizard .textarea-input:not(:placeholder-shown) + .field-label {
    top: 0 !important;
    font-size: 12px !important;
    color: #999 !important;
    transform: translateY(-8px) !important;
}

.wspfy-wizard .textarea-input {
    resize: vertical !important;
    min-height: 60px !important;
}

/* Строка время + таймзона */
.wizard-popup .time-tz-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.wizard-popup .time-field {
    flex: 0 0 60px;
    position: relative;
}

.wizard-popup .tz-field {
    flex: 1;
    position: relative;
}

/* Стилизация select как обычного поля */
.wspfy-wizard select.text-input {
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 16px !important;
    padding-right: 32px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.wizard-popup .congrats-section {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.wizard-popup .congrats-section.show {
    display: flex;
}

/* Скрываем поля по умолчанию */
.wizard-popup #senderNameGroup,
.wizard-popup .sender-field .phone-field {
    display: none;
}

.wizard-popup .char-counter {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

/* Радио кнопки - вкладки */
.wizard-popup .radio-group {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.wizard-popup .radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.wizard-popup .radio-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wizard-popup .radio-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid #e6e6e6;
    background: transparent;
    transition: border-color 0.3s ease;
    width: 100%;
    height: 48px;
    position: relative;
}

.wizard-popup .radio-custom.active {
    border: 1px solid #e6e6e6;
}

/* JS-индикатор рамки вкладок */
.wizard-popup .tab-border-indicator {
    position: absolute;
    top: -1px;
    left: -1px;
    height: calc(100% + 2px);
    pointer-events: none;
    transition: left 200ms ease, width 200ms ease;
    box-sizing: content-box;
    border: none;
    outline: 3px solid #000;
    outline-offset: 0;
}

/* Удалены стили активной рамки и наведения */

.wizard-popup .radio-text {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-popup .radio-custom.active .radio-text {
    color: #000;
}

/* Поля ввода телефона */
.wizard-popup .phone-field {
    margin-bottom: 16px;
}

.wizard-popup .phone-input-container {
    position: relative;
}

.wizard-popup .phone-label {
    position: relative;
    display: block;
    cursor: text;
}

.wizard-popup .phone-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.wizard-popup .phone-input:focus {
    border-color: #667eea;
}

.wizard-popup .phone-placeholder,
.wizard-popup .phone-mask {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.wizard-popup .phone-mask {
    color: #333;
    opacity: 0;
}

.wizard-popup .phone-input:focus + .phone-placeholder,
.wizard-popup .phone-input:not(:placeholder-shown) + .phone-placeholder {
    opacity: 0;
}

.wizard-popup .phone-input:focus + .phone-placeholder + .phone-mask,
.wizard-popup .phone-input:not(:placeholder-shown)
    + .phone-placeholder
    + .phone-mask {
    opacity: 1;
}

.wizard-popup .field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* Подсказка под email */
.wizard-popup .email-hint {
    text-align: left;
    color: #7f7f7f;
}

/* Кнопка добавления поздравления */
.wizard-popup .add-message-section {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.wizard-popup button.add-message-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 16px 0 8px 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 400;
    color: #999;
    width: 100%;
    text-align: left;
}

.wizard-popup button.add-message-btn:hover {
    border-bottom-color: #000;
}

.wizard-popup button.add-message-btn .btn-text {
    font-size: 18px;
    color: #999;
}

.wizard-popup button.add-message-btn .btn-icon {
    color: #999;
}

.wizard-popup .btn-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-popup .btn-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* Скрытое поле отправителя */
.wizard-popup .sender-field {
    display: none;
}

.wizard-popup .sender-field.show {
    display: block;
}

/* Старые стили форм (для других шагов) */
.wizard-popup .delivery-form,
.wizard-popup .payment-form {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.wizard-popup .form-group {
    margin-bottom: 20px;
}

.wizard-popup .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.wizard-popup .form-group input,
.wizard-popup .form-group textarea {
    width: 100%;
    padding: 16px 0 8px 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.wizard-popup .form-group input:focus,
.wizard-popup .form-group textarea:focus {
    outline: none;
    border-bottom-color: #000;
}

.wizard-popup .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Сводка заказа */
.wizard-popup .order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wizard-popup .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.wizard-popup .summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wizard-popup .summary-item.total {
    font-weight: 600;
    font-size: 18px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #000;
    border-bottom: none;
}

.wizard-popup .summary-label {
    font-size: 14px;
    color: #666;
    flex: 1;
}

.wizard-popup .summary-value {
    font-size: 14px;
    color: #333;
    text-align: right;
    flex: 1;
}

.wizard-popup .summary-item.total .summary-label,
.wizard-popup .summary-item.total .summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.wizard-popup button.payment-btn {
    width: 100%;
    padding: 15px;
    background: #05005b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wizard-popup button.payment-btn:hover {
    background: #06006e;
}

/* ============================================
   МОБИЛЬНЫЕ СТИЛИ
   Подключены из отдельного файла: virtual-card-wizard-mobile.css
   ============================================ */
