/* ── Widget wrapper — fixed bottom-left, no fullscreen overlay ── */
.alx-survey-popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99998;
    width: 360px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.alx-survey-popup[hidden] {
    display: none;
}

/* ── Dialog card ── */
.alx-survey-popup__dialog {
    position: relative;
    border-radius: 20px;
    padding: 24px 22px 18px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(240, 82, 67, 0.38), transparent 38%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 30%),
        linear-gradient(145deg, #111827 0%, #0b1220 55%, #080d18 100%);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.20, 0.64, 1),
        opacity 0.3s ease;
}

.alx-survey-popup.is-visible .alx-survey-popup__dialog {
    transform: translateY(0);
    opacity: 1;
}

/* ── Close button ── */
.alx-survey-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.alx-survey-popup__close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: rotate(90deg);
}

/* ── Header ── */
.alx-survey-popup__header {
    margin-bottom: 14px;
    padding-right: 22px;
}

.alx-survey-popup__step-label {
    font-family: Onest, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    margin: 0 0 8px;
}

.alx-survey-popup__progress {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    margin-bottom: 12px;
    overflow: hidden;
}

.alx-survey-popup__progress-fill {
    height: 100%;
    background: #f05243;
    border-radius: 100px;
    transition: width 0.4s ease;
    width: 0%;
}

.alx-survey-popup__title {
    font-family: Onest, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
    color: #ffffff;
}

.alx-survey-popup__hint {
    font-family: Onest, sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
    min-height: 1em;
}

/* ── Options list — single column ── */
.alx-survey-popup__body {
    margin-bottom: 14px;
}

.alx-survey-popup__options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.alx-survey-popup__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.78);
    font-family: Onest, sans-serif;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
    text-align: left;
    line-height: 1.4;
    width: 100%;
}

.alx-survey-popup__option:hover {
    border-color: rgba(240, 82, 67, 0.5);
    background: rgba(240, 82, 67, 0.07);
    color: #ffffff;
}

.alx-survey-popup__option.is-selected {
    border-color: #f05243;
    background: rgba(240, 82, 67, 0.13);
    color: #ffffff;
}

/* Radio dot / Checkbox mark */
.alx-survey-popup__option-mark {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    transition:
        border-color 0.18s ease,
        background 0.18s ease;
    position: relative;
}

.alx-survey-popup__option-mark--radio {
    border-radius: 50%;
}

.alx-survey-popup__option-mark--checkbox {
    border-radius: 4px;
}

.alx-survey-popup__option.is-selected .alx-survey-popup__option-mark {
    border-color: #f05243;
    background: #f05243;
}

/* Radio inner dot */
.alx-survey-popup__option-mark--radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.alx-survey-popup__option.is-selected .alx-survey-popup__option-mark--radio::after {
    opacity: 1;
}

/* Checkbox checkmark */
.alx-survey-popup__option-mark--checkbox::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: 2px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.alx-survey-popup__option.is-selected .alx-survey-popup__option-mark--checkbox::after {
    opacity: 1;
}

/* ── Footer ── */
.alx-survey-popup__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.alx-survey-popup__skip {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.32);
    font-family: Onest, sans-serif;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.18s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alx-survey-popup__skip:hover {
    color: rgba(255, 255, 255, 0.6);
}

.alx-survey-popup__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: #f05243;
    color: #ffffff;
    font-family: Onest, sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition:
        background 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease,
        opacity 0.22s ease;
    white-space: nowrap;
}

.alx-survey-popup__btn:hover:not(:disabled) {
    background: transparent;
    color: #f05243;
    border-color: #f05243;
}

.alx-survey-popup__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Thank you screen ── */
.alx-survey-popup__thanks {
    text-align: center;
    padding: 10px 0 6px;
    font-family: Onest, sans-serif;
}

.alx-survey-popup__thanks[hidden] {
    display: none;
}

.alx-survey-popup__thanks-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

.alx-survey-popup__thanks-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .alx-survey-popup {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }
}
