/* ─────────────────────────────────────────
   Need Selector — Frontend Styles
   Ukuyila / v1.2.5
   All rules scoped to .uky-ns-wrap
───────────────────────────────────────── */

/* ── Divi layout-shift fix ──────────────
   Divi's et_flex_row uses align-items:
   normal (= stretch), locking both columns
   to the same height. When the panel opens
   and the selector column grows, the row
   recalculates — and because the section
   is display:flex/align-items:center, that
   reflow shifts all rows vertically.

   Fix: set align-items:flex-start on the
   row containing .uky-ns-wrap. Each column
   then sizes to its own content. The row
   height is set by the taller sibling; the
   selector column grows freely below it.
   The section's centering is undisturbed.
───────────────────────────────────────── */
.et_pb_row:has( .uky-ns-wrap ) {
    align-items: flex-start !important;
}

.uky-ns-wrap {
    --uky-ns-accent:        #A6CE39;
    --uky-ns-accent-50:     rgba(166,206,57,0.5);
    --uky-ns-accent-hover:  #B6D65C;
    --uky-ns-text:          #FFFFFF;
    --uky-ns-text-muted:    rgba(255,255,255,0.55);
    --uky-ns-panel-bg:      rgba(0,0,0,0.5);
    --uky-ns-panel-border:  rgba(166,206,57,0.25);
    --uky-ns-radius:        12px;
    --uky-ns-radius-sm:     8px;

    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Card — transparent bg ── */
.uky-ns-card {
    background: transparent;
    border-radius: var(--uky-ns-radius);
    padding: 6px;
}

/* ── Select row ── */
.uky-ns-select-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.uky-ns-select-wrap {
    position: relative;
    flex: 1;
}

/* Border is green from the start; 50% opacity at rest, full on focus/selected */
.uky-ns-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 2px solid var(--uky-ns-accent-50);
    border-radius: var(--uky-ns-radius-sm);
    color: var(--uky-ns-text);
    font-size: 1rem;
    font-family: inherit;
    padding: 14px 44px 14px 18px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    outline: none;
}

.uky-ns-select:focus,
.uky-ns-select.uky-ns-select--chosen {
    border-color: var(--uky-ns-accent);
}

.uky-ns-select option {
    background: #1a2540;
    color: var(--uky-ns-text);
}

.uky-ns-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--uky-ns-accent);
    font-size: 1.4rem;
    pointer-events: none;
    line-height: 1;
}

/* ── Hint ── */
.uky-ns-hint {
    text-align: center;
    color: var(--uky-ns-text-muted);
    font-size: 0.82rem;
    margin-top: 10px;
    letter-spacing: 0.01em;
}

/* ── Answer Panel ──
   In normal flow so the Divi row expands downward.
   The section/row must NOT have a fixed height or overflow:hidden —
   add min-height:0 !important; overflow:visible !important; to the
   Divi row's custom CSS if the builder is constraining it.
── */
.uky-ns-panel {
    background: var(--uky-ns-panel-bg);
    border: 1px solid var(--uky-ns-panel-border);
    border-radius: var(--uky-ns-radius);
    padding: 22px 24px 24px;
    margin-top: 12px;

    /* Slide-in animation */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
}

.uky-ns-panel[hidden] {
    display: block !important; /* override hidden so transition works */
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.uky-ns-panel.uky-ns-panel--visible {
    max-height: 600px; /* generous ceiling for bullet-heavy answers */
    opacity: 1;
    padding: 22px 24px 24px;
    pointer-events: auto;
}

/* ── Panel label ── */
.uky-ns-panel-label {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--uky-ns-accent);
    margin-bottom: 12px;
}

/* ── Panel body text ── */
.uky-ns-panel-text {
    color: var(--uky-ns-text);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 20px; /* clear space above CTA */
}

/* Bullet list styling inside panel text */
.uky-ns-panel-text ul,
.uky-ns-panel-text ol {
    margin: 8px 0 8px 0;
    padding-left: 1.4em;
}

.uky-ns-panel-text ul {
    list-style: disc;
}

.uky-ns-panel-text ol {
    list-style: decimal;
}

.uky-ns-panel-text li {
    margin-bottom: 6px;
    line-height: 1.55;
}

/* ── CTA link ── */
.uky-ns-panel-cta {
    display: inline-block;
    color: var(--uky-ns-accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: 4px; /* extra gap below text on all viewports */
}

.uky-ns-panel-cta:hover {
    color: var(--uky-ns-accent-hover);
    text-decoration: underline;
}

.uky-ns-panel-cta:empty {
    display: none;
}

/* ── Mobile ── */
@media ( max-width: 480px ) {
    .uky-ns-wrap {
        max-width: 100%;
    }

    .uky-ns-select {
        font-size: 0.9rem;
        padding: 12px 40px 12px 14px;
    }

    .uky-ns-panel-label {
        font-size: 17px;
    }

    .uky-ns-panel-text {
        font-size: 15px;
    }

    .uky-ns-panel {
        padding: 18px 18px 22px;
    }

    .uky-ns-panel.uky-ns-panel--visible {
        padding: 18px 18px 22px;
    }
}
