/* Базовый контейнер квиза */
.nocb-quiz-wrapper {
    max-width: 1160px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f5f7ff;
}

/* Инфоблок над квизом */
.nocb-quiz-info {
    background: #050712;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(120, 255, 169, 0.2);
}

.nocb-quiz-info-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
}

.nocb-quiz-info-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.nocb-quiz-info-list li {
    margin-bottom: 4px;
}

/* Карточка квиза */
.nocb-quiz-card {
    background: radial-gradient(circle at top left, #111827 0, #020617 55%, #000 100%);
    border-radius: 20px;
    padding: 24px 28px 24px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.7);
}

/* Заголовок и степпер */
.nocb-quiz-header {
    margin-bottom: 20px;
}

.nocb-quiz-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.nocb-quiz-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.nocb-quiz-step-pill {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #9ca3af;
    border: 1px solid rgba(51, 65, 85, 0.9);
    display: inline-flex;
    align-items: center;
}

.nocb-quiz-step-pill.is-active {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #020617;
    border-color: transparent;
}

/* Контент шагов */
.nocb-quiz-body {
    margin-top: 20px;
}

.nocb-quiz-step-panel {
    display: none;
}

.nocb-quiz-step-panel.is-active {
    display: block;
}

.nocb-quiz-step-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.nocb-quiz-step-subtitle {
    margin: 0 0 20px;
    font-size: 14px;
    color: #9ca3af;
}

/* Поля форм */
.nocb-field {
    display: block;
    margin-bottom: 16px;
}

.nocb-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #e5e7eb;
}

.nocb-input,
.nocb-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.nocb-input:focus,
.nocb-textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
    background: rgba(15, 23, 42, 0.95);
}

.nocb-textarea {
    resize: vertical;
}

/* Кнопки */
.nocb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.nocb-btn[disabled] {
    cursor: default;
    opacity: 0.6;
}

.nocb-btn-primary {
    background: radial-gradient(circle at 10% 0, #a7f3d0 0, #22c55e 40%, #166534 100%);
    color: #020617;
    box-shadow: 0 14px 35px rgba(22, 163, 74, 0.6);
}

.nocb-btn-secondary {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.nocb-btn-ghost {
    background: transparent;
    color: #9ca3af;
    border: 1px solid rgba(75, 85, 99, 0.8);
}

.nocb-quiz-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.nocb-quiz-footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Вывод ТЗ / сценария */
.nocb-quiz-output-wrapper {
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.65);
    padding: 16px 18px;
    min-height: 160px;
    position: relative;
}

.nocb-quiz-output-placeholder {
    font-size: 14px;
    color: #6b7280;
}

.nocb-quiz-output {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #e5e7eb;
}

/* Медиа-блок */
.nocb-quiz-media-box {
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    background: radial-gradient(circle at top left, #0f172a 0, #020617 55%, #000 100%);
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
}

.nocb-quiz-media-placeholder {
    border-radius: 14px;
    background: repeating-linear-gradient(
        -45deg,
        rgba(15, 23, 42, 0.9),
        rgba(15, 23, 42, 0.9) 8px,
        rgba(30, 64, 175, 0.22) 8px,
        rgba(30, 64, 175, 0.22) 16px
    );
    height: 260px;
}

.nocb-quiz-media-image {
    display: block;
    width: 100%;
    border-radius: 14px;
    max-height: 360px;
    object-fit: cover;
}

.nocb-quiz-media-status {
    margin-top: 10px;
    font-size: 13px;
    color: #9ca3af;
}

.nocb-quiz-media-status.is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.4);
    border-top-color: #22c55e;
    margin-right: 8px;
    animation: nocb-spin 0.7s linear infinite;
}

/* Чекбокс и лид */
.nocb-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 6px;
}

.nocb-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.nocb-quiz-lead-message {
    margin-top: 10px;
    font-size: 13px;
}

.nocb-quiz-lead-message.is-loading {
    color: #9ca3af;
}

.nocb-quiz-lead-message.is-error {
    color: #f97373;
}

.nocb-quiz-lead-message.is-success {
    color: #4ade80;
}

/* Статус для generic блоков */
.nocb-quiz-status.is-loading::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.4);
    border-top-color: #22c55e;
    margin-right: 8px;
    animation: nocb-spin 0.7s linear infinite;
}

/* Анимация */
@keyframes nocb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .nocb-quiz-card {
        padding: 20px 16px 18px;
    }

    .nocb-quiz-title {
        font-size: 20px;
    }

    .nocb-quiz-steps {
        gap: 6px;
    }

    .nocb-quiz-step-pill {
        font-size: 12px;
        padding: 5px 9px;
    }

    .nocb-quiz-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .nocb-quiz-footer-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .nocb-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Контейнер квиза — выровнять по центру и ограничить ширину под дизайн сайта */
.nocb-quiz-wrapper {
    width: 100%;
    max-width: 1100px;      /* под /all-articles/ и архив; на главной все равно ограничит .aiux-wrap (1080px) */
    margin: 32px auto 48px; /* центрируем блок и даём отступы сверху/снизу */
    padding: 0;             /* если внутри квиза уже есть свои отступы, внешние можно обнулить */
}
