/* ===========================
   SURVEY WORKFLOW
   =========================== */

.survey-modal {

    position: relative;

}


.survey-summary-sidecar {

    display: none;

    position: relative;

    min-width: 0;

    max-height:
        calc(100vh - 64px);

    overflow-y: auto;

    padding: 0;

    background: var(--bg-card);

    border: none;

    border-radius: 18px;

    box-shadow: var(--shadow-workspace);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translateX(28px) scale(.985);

    transition:
        opacity .32s ease,
        transform .42s cubic-bezier(.22, .8, .3, 1),
        visibility 0s linear .42s;

}


.survey-workspace.has-sidecar .survey-summary-sidecar {

    display: block;

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(0) scale(1);

    transition:
        opacity .32s ease,
        transform .42s cubic-bezier(.22, .8, .3, 1),
        visibility 0s;

}


.survey-summary-sidecar::before {

    display: none;

}

.survey-summary-header {

    position: sticky;

    top: 0;

    z-index: 3;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 18px 20px;

    background:
        linear-gradient(90deg,
            rgba(107, 161, 255, .25),
            rgba(79, 140, 255, .12) 52%,
            rgba(54, 120, 245, .035));

    border-bottom: 1px solid var(--divider-soft);

    box-shadow: 0 8px 20px rgba(0, 0, 0, .10);

}

.survey-summary-body {

    padding: 20px 22px 24px;

}


.survey-summary-eyebrow {

    margin: 0;

    color: var(--accent-hover);

    line-height: 1;

}


@media (max-width: 1000px) {

    .survey-summary-sidecar {

        display: none;

    }

}

/* ===========================
   SURVEY FORM CONTROLS
   =========================== */

.question-field-stack {

    display: grid;

    gap: 16px;

    justify-items: start;

}

.decision-input {

    width: 100%;

}

.category-select {

    width: min(100%, 320px);

}

.category-field {

    display: grid;

    gap: 9px;

    width: min(100%, 320px);

}

.category-field-label {

    display: flex;

    align-items: center;

    justify-content: space-between;

    color: var(--text-secondary);

}

.required-field-label,
.workflow-optional-label {

    color: var(--text-muted);

    font-size: var(--font-meta);

    font-weight: var(--weight-semibold);

    letter-spacing: .08em;

    text-transform: uppercase;

}

.workflow-optional-label {

    margin-left: 8px;

    padding-left: 9px;

    border-left: 1px solid var(--divider-medium);

}

.question-textarea {

    min-height: 150px;

}

/* ===========================
   SURVEY SUMMARY
   =========================== */

.summary-decision {

    min-height: 0;

    margin-bottom: 12px;

}

.summary-category-item {

    display: flex;

    align-items: center;

    margin-bottom: 18px;

}

.summary-category-item.summary-item-hidden {

    display: none;

}

.summary-item {

    display: grid;

    gap: 8px;

    margin: 0;

    padding-bottom: 14px;

    border-bottom:
        1px solid var(--divider-soft);

}

.summary-item:last-child {

    margin-bottom: 0;

}

.summary-item-hidden {
    display: none;
}

.summary-item:not(.summary-item-hidden) {

    animation:
        summaryItemEnter 220ms cubic-bezier(.22, .8, .3, 1) both;

}

@keyframes summaryItemEnter {

    from {

        opacity: 0;

        transform: translateY(5px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}

.summary-problem-item {

    margin:
        14px -22px;

    padding:
        14px 22px;

    background:
        linear-gradient(90deg,
            var(--problem-surface),
            var(--problem-surface-fade) 68%,
            transparent);

    border-left: none;

    border-bottom: none;

}

.summary-problem-item .summary-label {

    color: var(--problem-heading);

}

.summary-option {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-bottom: 5px;

    padding: 7px 9px;

    background: rgba(255, 255, 255, .018);

    border-left: 2px solid var(--accent-border-subtle);

    border-radius: 0 7px 7px 0;

    line-height: 1.5;

}

.summary-option:last-child {

    margin-bottom: 0;

}

.summary-option-chevron {

    width: 14px;

    flex-shrink: 0;

    color: var(--accent);

    font-size: 14px;

    font-weight: 600;

    line-height: 1;

}

.summary-option-chevron::before {

    content: "›";

}

select.text-input:invalid {

    color: var(--control-placeholder);

}

/* ===========================
   DYNAMIC INPUTS & LISTS
   =========================== */

.dynamic-input {

    width: 100%;

    min-width: 0;

    flex: 1;

}

.dynamic-row {

    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 14px;

}

.dynamic-row .delete-item {

    flex-shrink: 0;

}

.list-chevron {

    color: var(--accent);

    font-size: 22px;

    font-weight: 600;

    width: 18px;

    flex-shrink: 0;

}

.summary-option .list-chevron {

    font-size: 14px;

    width: 14px;

}

.list-chevron::before {

    content: "›";

}

.delete-item {

    font-size: 18px;

}

.survey-add-option-button {

    margin: 2px 0 18px 32px;

}

.summary-item+.summary-item {

    padding-top: 14px;

}

.list-checkbox {

    width: 17px;

    height: 17px;

    margin-left: 1px;

    border-radius: 5px;

}

#summaryInformation .summary-option {

    align-items: center;

    padding: 4px 0;

    background: transparent;

    border-left: none;

    border-radius: 0;

}

#summaryInformation .checkbox-box {

    margin-top: 0;

    border-color: var(--border-hover);

}

.survey-summary-live-status {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: var(--text-muted);

    font-size: var(--font-meta);

    font-weight: var(--weight-medium);

    white-space: nowrap;

}

.survey-summary-live-dot {

    width: 6px;

    height: 6px;

    background: var(--accent);

    border-radius: 50%;

    box-shadow: 0 0 8px var(--accent-shadow-strong);

}

/* ===========================
   SURVEY PILL INPUT
   =========================== */

#pillContainer {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;

    margin-bottom: 24px;

}

.pill {

    gap: 10px;

}

.delete-pill {

    font-size: 15px;

}

.pill-input-row {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;

}

.pill-input {

    flex: 1;

    min-width: 0;

}

/* ===========================
   DEADLINE QUESTION
   =========================== */

.deadline-row {

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;

}

.deadline-label {

    margin: 0;

}

.switch {

    position: relative;

    display: inline-block;

    width: 58px;
    height: 34px;

}

.switch input {

    opacity: 0;
    width: 0;
    height: 0;

}

.slider {

    position: absolute;

    cursor: pointer;

    inset: 0;

    background-color: var(--text-muted);

    border-radius: 999px;

    transition: .25s;

}

.slider::before {

    content: "";

    position: absolute;

    height: 26px;
    width: 26px;

    left: 4px;
    top: 4px;

    background: var(--text-primary);

    border-radius: 50%;

    transition: .25s;

}

.switch input:checked+.slider {

    background-color: var(--accent);

}

.switch input:checked+.slider::before {

    transform: translateX(22px);

}

#deadlinePicker {

    width: min(100%, 240px);

    margin: 10px auto;

}

.deadline-picker {

    display: flex;

    justify-content: center;

    margin-top: 24px;

}

.survey-modal input[type="date"] {

    width: 100%;

    text-align: center;

    letter-spacing: .04em;

}
