/* Sage Form Styles */

/* Override all text selection colors to green */
*::selection,
*::-moz-selection,
input::selection,
input::-moz-selection,
textarea::selection,
textarea::-moz-selection,
.e-input::selection,
.e-input::-moz-selection {
    background: #c8e6c9 !important;
    color: #1b5e20 !important;
}

/* Pills Label */
.pills-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Pill Container Base */
.pill-container {
    margin-top: 8px;
}

/* Cloud Layout */
.cloud-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

/* Line Layout */
.line-layout {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    overflow-x: auto;
}

.line-layout .pill-button {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pill Button Styles */
.pill-button {
    display: inline-block;
    padding: 6px 12px;
    background: var(--ss-color-bg);
    border: 1px solid var(--ss-color-border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--ss-font-size-website);
    font-weight: 500;
    color: var(--ss-color-text-light);
    text-decoration: none;
    user-select: none;
}

.pill-button:hover {
    background: var(--ss-color-bg-hover);
    border-color: var(--ss-color-border-light);
    color: var(--ss-color-text);
}

.pill-button.active,
input:checked + .pill-button {
    background: var(--ss-color-brand);
    border-color: var(--ss-color-brand);
    color: var(--ss-color-text-inverse);
}

/* Intro Question input wrapper width */
#intro_question.e-input-group,
#intro_question.e-control-wrapper,
.e-input-group:has(#intro_question),
.e-control-wrapper:has(#intro_question) {
    width: 95% !important;
}

/* Evaluation Guideline badge */
.guideline-select-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guideline-badge { display: inline-block; padding: 7px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.guideline-flexible { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.guideline-relaxed { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.guideline-balanced { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.guideline-strict { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.guideline-explainer { font-size: var(--ss-font-size-website); color: var(--ss-color-text); line-height: 1.5; }

/* Field Description */
.field-description {
    margin: 4px 0 2px 0;
    font-size: var(--ss-font-size-meta);
    color: var(--ss-color-text-light);
    font-style: italic;
    line-height: var(--ss-line-height-meta);
}

/* Remove bottom padding from paragraphs in step cards */
.step-card p {
    padding-bottom: 0;
}

/* Common Layout Helpers */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.three-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.inline-field {
    display: inline-block;
    margin-right: 16px;
}

.flex-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

/* Code Editor */
.code-editor {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    tab-size: 4;
    border: 1px solid var(--ss-color-border-light);
    border-radius: 4px;
}

/* Screen Form Styles */
.screen-field {
    margin-bottom: 1.5rem;
}

.screen-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.screen-field-col {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent overflow */
}

.screen-label {
    display: block;
    font-size: var(--ss-font-size-website);
    font-weight: var(--ss-font-weight-semibold);
    margin-bottom: 8px;
    color: var(--ss-color-text);
}

.screen-label .text-red-500,
.text-red-500 {
    color: var(--ss-notify-error-color);
}

.screen-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--ss-color-border-light);
    border-radius: 8px;
    font-size: var(--ss-font-size-website);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.screen-input:focus {
    outline: none;
    border-color: var(--ss-color-brand);
    box-shadow: 0 0 0 3px rgba(106, 153, 106, 0.1);
}

.screen-input.font-mono {
    font-family: Consolas, Monaco, monospace;
}

.screen-readonly-field {
    padding: 12px;
    background-color: var(--ss-color-bg-hover);
    border: 1px solid var(--ss-color-border-light);
    border-radius: 8px;
    color: var(--ss-color-text-light);
}

.field-description {
    margin-top: 4px;
    font-size: var(--ss-font-size-meta);
    color: var(--ss-color-text-light);
    line-height: var(--ss-line-height-meta);
}

.field-description-compact {
    margin: 0;
    font-size: var(--ss-font-size-meta);
    color: var(--ss-color-text-light);
    line-height: var(--ss-line-height-meta);
}

.field-description code {
    display: inline-block;
    background: var(--ss-color-brand-hover);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: 4px;
}

.field-description code:hover {
    background: var(--ss-color-bg-hover);
}

.screen-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: var(--ss-font-size-website);
    font-weight: var(--ss-font-weight-semibold);
}

.screen-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* End screen feedback icon controls */
body.sagescreen-route .temperature-option,
body.sagescreen-route .ease-option {
    background: transparent !important;
}

body.sagescreen-route .temperature-option:hover:not(.selected),
body.sagescreen-route .temperature-option:focus:not(.selected),
body.sagescreen-route .temperature-option:active:not(.selected),
body.sagescreen-route .ease-option:hover:not(.selected),
body.sagescreen-route .ease-option:focus:not(.selected),
body.sagescreen-route .ease-option:active:not(.selected) {
    background: transparent !important;
    outline: 2px solid var(--ss-color-brand-hover) !important;
    outline-offset: 2px;
}

/* Make selection clearly visible without background fill */
body.sagescreen-route .temperature-option.selected,
body.sagescreen-route .ease-option.selected {
    outline: 2px solid var(--ss-color-brand-hover) !important;
    outline-offset: 2px;
    background-color: var(--ss-color-bg-subtle) !important;
}

body.sagescreen-route .temperature-option.selected .text-xs,
body.sagescreen-route .ease-option.selected .text-xs {
    color: var(--ss-color-text);
    font-weight: var(--ss-font-weight-semibold);
    text-decoration: underline;
}
