/* Omega Smart Quiz — Frontend v1.0 */
.omega-quiz-widget {
    max-width: 620px;
    margin: 0 auto;
    font-family: var(--oq-font, inherit);
}

.oq-widget {
    --oq-primary: #797AFF;
    --oq-font: inherit;
    --oq-radius: 18px;
    background: #fff;
    border-radius: var(--oq-radius);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    direction: rtl;
}

/* ---- Progress ---- */
.oq-progress-wrap {
    padding: 18px 22px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.4s ease;
}
.oq-progress-track {
    flex: 1;
    height: 5px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 3px;
    overflow: hidden;
}
.oq-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--oq-primary);
    border-radius: 3px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.oq-progress-label {
    font-size: 11px;
    opacity: 0.45;
    white-space: nowrap;
    min-width: 36px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* ---- Question container ---- */
.oq-question-container {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

/* ---- Question ---- */
.oq-question {
    padding: 26px 28px 32px;
    position: absolute;
    inset: 0;
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1),
                opacity  0.34s ease;
}
/* Forward: enter from left (RTL) */
.oq-question.is-entering {
    transform: translateX(-50px);
    opacity: 0;
}
/* Back: enter from right */
.oq-question.is-entering-back {
    transform: translateX(50px);
    opacity: 0;
}
.oq-question.is-active {
    transform: translateX(0);
    opacity: 1;
    position: relative;
}
.oq-question.is-leaving {
    transform: translateX(50px);
    opacity: 0;
    pointer-events: none;
}
.oq-question.is-leaving-back {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
}

/* ---- Back button ---- */
.oq-back {
    background: none;
    border: none;
    color: var(--oq-primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    opacity: 0.65;
    transition: opacity 0.2s;
    font-family: inherit;
    display: block;
}
.oq-back:hover { opacity: 1; }

/* ---- Question text ---- */
.oq-question-text {
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 22px;
    color: #1a1a2e;
}

/* ---- Options ---- */
.oq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.oq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border: 2px solid rgba(0, 0, 0, 0.09);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: right;
    font-size: 0.97rem;
    font-weight: 500;
    width: 100%;
    font-family: inherit;
    color: #1a1a2e;
    transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.18s;
}
.oq-option:hover {
    border-color: var(--oq-primary);
    background: rgba(121, 122, 255, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(121, 122, 255, 0.12);
}
.oq-option.is-selected {
    border-color: var(--oq-primary);
    background: var(--oq-primary);
    color: #fff;
    transform: translateY(-1px);
}
.oq-opt-icon  { font-size: 1.2rem; flex-shrink: 0; }
.oq-opt-label { flex: 1; line-height: 1.35; }

/* ---- Lead form ---- */
.oq-lead-form {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 4px;
}
.oq-input {
    padding: 13px 16px;
    border: 2px solid rgba(0, 0, 0, 0.09);
    border-radius: 10px;
    font-size: 0.97rem;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    background: #fafafa;
    color: #1a1a2e;
    width: 100%;
    box-sizing: border-box;
}
.oq-input:focus      { border-color: var(--oq-primary); background: #fff; }
.oq-input::placeholder { color: #bbb; }

.oq-submit {
    padding: 14px 24px;
    background: var(--oq-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.12s;
    margin-top: 4px;
}
.oq-submit:hover    { opacity: 0.88; transform: translateY(-1px); }
.oq-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---- Error ---- */
.oq-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

/* ---- Thank you ---- */
.oq-thankyou {
    text-align: center !important;
    padding: 52px 28px 52px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.oq-ty-icon  { font-size: 3.2rem; margin-bottom: 14px; animation: oq-pop 0.4s ease; }
.oq-ty-title { font-size: 1.65rem; font-weight: 800; color: #1a1a2e; margin-bottom: 10px; }
.oq-ty-text  { font-size: 0.97rem; opacity: 0.62; line-height: 1.65; max-width: 320px; }

@keyframes oq-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .oq-question       { padding: 20px 18px 26px; }
    .oq-question-text  { font-size: 1.1rem; }
    .oq-option         { padding: 11px 14px; font-size: 0.92rem; }
    .oq-submit         { padding: 13px 18px; }
}
