/* ============================================
   Callback Form
   ============================================ */
.callback-form {
    max-width: 640px;
    margin: 40px auto 0;
    padding: 40px;
    text-align: left;
}

.cb-field {
    margin-bottom: 20px;
}

.cb-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 12px;
}

.cb-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--on-surface);
    font-family: var(--font-family);
    font-size: 16px;
    transition: all 0.25s ease;
}

.cb-input::placeholder {
    color: var(--on-surface-variant);
    opacity: 0.6;
}

.cb-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--tertiary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Поле даты с иконкой календаря */
.cb-field--date {
    position: relative;
}

.cb-input--date {
    padding-right: 52px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBD5E1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 22px;
}

/* Pill-кнопки «Как можно скорее / Выбрать дату» */
.cb-now {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Плавные переходы для всех интерактивных элементов */
.cb-pill,
.cb-time-slot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффект нажатия */
.cb-pill:active,
.cb-time-slot:active {
    transform: scale(0.98);
}

.cb-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.cb-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-hover);
}

.cb-pill__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cb-pill__text {
    font-size: 15px;
    font-weight: 500;
    color: var(--on-surface);
    transition: color 0.25s ease;
}

.cb-pill.is-active, .cb-time-slot.is-active, .cb-time-slot:hover.is-active {
    background: rgba(39, 201, 63, 0.12);
    border-color: rgba(39, 201, 63, 0.8);
}

.cb-pill__input:focus-visible + .cb-pill__text {
    outline: 2px solid var(--tertiary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Слоты времени */
.cb-time {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cb-time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.cb-time-slot:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-hover);
}

.cb-time-slot__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cb-time-slot__text {
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* Кастомный чекбокс согласия */
.cb-agreement {
    margin-bottom: 24px;
}

.cb-agreement .cb-checkbox__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cb-agreement label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.cb-checkbox__box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    position: relative;
    margin-top: 2px;
    transition: all 0.25s ease;
}

.cb-checkbox__input:checked + .cb-checkbox__box,
.cb-agreement .cb-checkbox__input:checked ~ .cb-checkbox__box {
    background: var(--tertiary);
    border-color: var(--tertiary);
}

.cb-checkbox__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.cb-checkbox__input:checked + .cb-checkbox__box::after,
.cb-agreement .cb-checkbox__input:checked ~ .cb-checkbox__box::after {
    transform: rotate(45deg) scale(1);
}

.cb-checkbox__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--on-surface-variant);
}

.cb-anchor {
    color: var(--tertiary);
    text-decoration: underline;
    transition: color 0.25s ease;
}

.cb-anchor:hover {
    color: var(--primary-glow);
}

/* Капча и кнопка */
.cb-captcha {
    margin-bottom: 24px;
    overflow: hidden;
}

.cb-submit {
    width: 100%;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* Ошибки валидации */
.cb-field .help-block {
    color: var(--primary);
    font-size: 13px;
    padding-top: 6px;
}

/* Адаптив */
@media (max-width: 768px) {
    .callback-form {
        padding: 28px 20px;
        margin-top: 24px;
    }

    .cb-time {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .cb-time {
        grid-template-columns: repeat(2, 1fr);
    }

    .cb-now {
        grid-template-columns: 1fr;
    }

    .callback-form {
        padding: 24px 16px;
    }
}

/* ============================================
   Feedback: Textarea в стиле callback
   ============================================ */
.cb-textarea-wrap {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cb-textarea-wrap:focus-within {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--tertiary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.cb-textarea {
    width: 100%;
    min-height: 140px;
    max-height: 320px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: var(--on-surface);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    border-radius: calc(var(--radius-md) - 4px);
}

.cb-textarea::placeholder {
    color: var(--on-surface-variant);
    opacity: 0.6;
}

.cb-textarea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    border-top: 1px solid var(--glass-border);
}

.cb-textarea-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--on-surface-variant);
    opacity: 0.8;
}

.cb-textarea-hint .material-symbols-outlined {
    font-size: 16px;
    color: var(--tertiary);
}

/* Кнопка-иконка отправки (оригинальный дизайн) */
.submit-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.submit-btn:hover {
    background: var(--primary-glow);
    border-color: var(--glass-border-hover);
    transform: scale(1.05);
}

.submit-btn:active {
    transform: scale(0.95);
}

.submit-btn .material-symbols-outlined {
    font-size: 20px;
    color: #fff;
}

/* Кастомный чекбокс (на feedback, т.к. в разметке использован label.cb-checkbox напрямую) */
label.cb-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

label.cb-checkbox .cb-checkbox__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

label.cb-checkbox .cb-checkbox__box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    position: relative;
    margin-top: 2px;
    transition: all 0.25s ease;
}

label.cb-checkbox .cb-checkbox__input:checked + .cb-checkbox__box {
    background: var(--tertiary);
    border-color: var(--tertiary);
}

label.cb-checkbox .cb-checkbox__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

label.cb-checkbox .cb-checkbox__input:checked + .cb-checkbox__box::after {
    transform: rotate(45deg) scale(1);
}

label.cb-checkbox .cb-checkbox__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--on-surface-variant);
}

/* Адаптив */
@media (max-width: 576px) {
    .cb-textarea-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cb-textarea-hint {
        font-size: 12px;
    }

    .submit-btn {
        align-self: flex-end;
    }
}
