/* Decision maker - follows existing site layout */

.generator-box {
    margin-bottom: 20px;
}

.generator-box,
.helpful-box {
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.generator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.form-row {
    margin-left: -10px;
    margin-right: -10px;
}

.form-row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 15px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.advanced-toggle {
    margin: 12px 0;
}

.advanced-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2ff;
    color: #1d2a5b;
    border: 1px solid #cfd8f6;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.advanced-btn:hover,
.advanced-btn[aria-expanded="true"] {
    background: #dbe3ff;
    border-color: #94a3ff;
}

.gear-icon {
    color: #5b6be8;
}

.chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.advanced-btn[aria-expanded="true"] .chevron {
    transform: rotate(-135deg);
}

.advanced-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #dfe7fb;
    border-radius: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    transition: max-height .3s ease, opacity .3s ease, padding .3s ease;
    overflow: hidden;
    max-height: 1200px;
}

.advanced-panel.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.checkbox-row .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
}

.option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.option-input {
    flex: 1 1 auto;
}

.btn-remove-option {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e1e5f0;
    background: #fff;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-remove-option:hover,
.btn-remove-option:focus {
    color: #ef4444;
    background: #fff1f2;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.15);
    outline: none;
}

.btn-add-option {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-add-option:hover,
.btn-add-option:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.3);
    outline: none;
}

.action-bar {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.btn-group-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn-cta,
.btn-spin,
.btn-clear {
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-cta {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.btn-spin {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #fff;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.25);
}

.btn-clear {
    background: transparent;
    color: #6b7280;
    border: 1px solid #cbd5f5;
}

.btn-cta:focus,
.btn-spin:focus,
.btn-clear:focus,
.btn-cta:hover,
.btn-spin:hover,
.btn-clear:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}

.btn-clear:hover {
    background: #f3f6ff;
}

.status-pill {
    min-height: 28px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #e1e5f0;
}

.status-pill.info {
    background: #f4f6fb;
    color: #1f2a44;
}

.status-pill.success {
    background: #e1f6ec;
    color: #0f5132;
}

.status-pill.error {
    background: #fde2e1;
    color: #842029;
}

.result-area {
    border-radius: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef2ff 100%);
    margin-top: 20px;
    border: 1px solid #dfe7fb;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.wheel-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0 4px;
    flex: 1 1 320px;
}

.wheel-wrapper {
    position: relative;
    width: min(320px, 100%);
    margin: 0 auto;
    aspect-ratio: 1;
    isolation: isolate;
}

.wheel-wrapper.wheel-xl {
    width: min(360px, 100%);
}

.wheel-spin-btn {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
}

#decisionWheel {
    position: relative;
    z-index: 1;
}

.wheel-wrapper::before,
.wheel-wrapper::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    z-index: 0;
}

.wheel-wrapper::before {
    background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.12), transparent 55%),
        radial-gradient(circle at 70% 70%, rgba(14, 165, 233, 0.14), transparent 60%),
        linear-gradient(135deg, #eef2ff, #e0f2fe);
    filter: drop-shadow(0 15px 30px rgba(15, 23, 42, 0.15));
}

.wheel-wrapper::after {
    inset: -6px;
    border: 8px solid rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

#decisionWheel {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 25px 40px rgba(15, 23, 42, 0.12);
    transform-origin: 50% 50%;
    border: 6px solid rgba(255, 255, 255, 0.9);
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid #ff5e5b;
    border-bottom: 0;
    transform: translateX(-50%);
    filter: drop-shadow(0 3px 3px rgba(15, 23, 42, 0.3));
    transition: transform .2s ease, filter .2s ease;
    z-index: 3;
}

#decisionResult.spinning .wheel-pointer {
    transform: translateX(-50%) scale(1.05);
    filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.35));
}

#decisionResult.spinning #decisionWheel {
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.25), 0 10px 20px rgba(14, 165, 233, 0.18);
}

.wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 82px;
    height: 82px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0e7ff);
    box-shadow:
        inset 0 1px 4px rgba(255, 255, 255, 0.85),
        inset 0 -2px 6px rgba(148, 163, 184, 0.35),
        0 10px 22px rgba(15, 23, 42, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.9);
    z-index: 2;
    transition: transform .25s ease, box-shadow .25s ease;
}

#decisionResult.spinning .wheel-hub {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow:
        inset 0 1px 4px rgba(255, 255, 255, 0.85),
        inset 0 -2px 6px rgba(148, 163, 184, 0.35),
        0 12px 28px rgba(79, 70, 229, 0.28);
}

.wheel-caption {
    margin-top: 12px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wheel-caption.small {
    margin-top: 14px;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: none;
    font-style: italic;
    opacity: 0.7;
}

#wheelStatus:empty {
    display: none;
}

.winner-panel {
    display: none;
    text-align: center;
    width: 100%;
}

.result-area.has-result .winner-panel {
    display: block;
}

.winner-choice {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0 10px;
}

.result-label {
    font-size: 12px;
    letter-spacing: .1em;
    margin-bottom: 6px;
}

.result-choice {
    font-size: 28px;
    font-weight: 600;
    margin: 6px 0 12px;
}

#decisionResult.spinning .result-choice {
    animation: pulse 0.7s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: .45; transform: scale(.98); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: .45; transform: scale(.98); }
}

.confidence-meter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c757d;
}

.confidence-meter strong {
    font-size: 30px;
    color: #0f172a;
    letter-spacing: normal;
}

.result-analysis {
    border-top: 1px solid #cfd8f6;
    margin-top: 24px;
    padding-top: 18px;
}

.result-points {
    list-style: disc;
    margin: 8px 0 0 20px;
}

.runnerups {
    flex: 1 1 100%;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.result-area.no-wheel {
    flex-direction: column;
}

.result-area.no-wheel .wheel-panel {
    display: none;
}

.result-area.no-wheel .summary-panel {
    width: 100%;
    margin-top: 0;
}

.btn-spin.hidden {
    display: none !important;
}

.runner-card {
    border: 1px solid #e1e5f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    font-size: 13px;
}

.runner-card h4 {
    margin-top: 0;
    font-size: 14px;
}

.history-stack {
    border: 1px solid #e1e5f0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    border: 1px solid #e1e5f0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}

.history-item .meta {
    font-size: 12px;
    color: #6c757d;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-grid article {
    border: 1px solid #e1e5f0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
}

.helpful-box {
    margin-bottom: 20px;
}

.content-sm > .light-box > ul {
    margin-left: 18px;
    padding-left: 18px;
}

@media (max-width: 767px) {
    .result-area {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-panel.stacked {
        margin-top: 8px;
        width: 100%;
    }

    .btn-group-cta {
        width: 100%;
    }

    .advanced-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .results-layout {
        flex-direction: column;
    }
}
