/* QAWizard Styling and Animations */
/* Aligned with PA.gov Business Portal Theme */

/* Hide antiforgery token input from UI - completely remove from rendering */
input[name="__RequestVerificationToken"] {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    visibility: collapse !important;
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* ============================================
   Container & Layout
   ============================================ */

.wizard-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    font-family: PlusJakartaSans, sans-serif;
}

.wizard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.wizard-progress-sidebar {
    background: linear-gradient(135deg, #CFE5FF 0%, #e8f1ff 100%);
    border: 1px solid #dfe8ff;
    border-radius: 0.375rem;
    padding: 20px;
    position: sticky;
    top: 120px;
    box-shadow: 0 1px 3px 1px rgba(0, 29, 52, 0.15);
    height: fit-content;
}

.progress-header {
    margin: 0 0 16px 0;
}

.progress-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #00629E;
    margin: 0;
    border-bottom: 2px solid #00629E;
    padding-bottom: 8px;
}

.progress-tracker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-bar-container {
    margin-bottom: 4px;
}

.progress-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #001d34;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.progress-bar-label .percentage {
    color: #00629E;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00629E 0%, #035D7D 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.completed-questions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #dfe8ff;
}

/* Desktop: Toggle button hidden, content always visible */
.completed-questions-header {
    display: block;
}

.completed-questions-toggle {
    display: none;
}

.completed-questions-count {
    display: none;
}

.completed-questions-list {
    max-height: none;
    overflow: visible;
}

@media (prefers-color-scheme: dark) {
    .completed-questions {
        border-top-color: #3a3a3a;
    }
}

.completed-questions-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #00629E;
    margin-bottom: 8px;
}

@media (prefers-color-scheme: dark) {
    .completed-questions-title {
        color: #4da6ff;
    }
}

.completed-question-item {
    font-size: 0.8rem;
    color: #001d34;
    padding: 6px 8px;
    background-color: #f5fafe;
    border-left: 3px solid #218739;
    border-radius: 0 2px 2px 0;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (prefers-color-scheme: dark) {
    .completed-question-item {
        color: #e0e0e0;
        background-color: #2a2a2a;
        border-left-color: #4caf50;
    }
}

.completed-question-item:hover {
    background-color: #e6f4ff;
    border-left-color: #00629E;
}

@media (prefers-color-scheme: dark) {
    .completed-question-item:hover {
        background-color: #3a3a3a;
        border-left-color: #4da6ff;
    }
}

.completed-question-item .checkmark {
    color: #218739;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (prefers-color-scheme: dark) {
    .completed-question-item .checkmark {
        color: #4caf50;
    }
}

.completed-question-item .q-text {
    flex: 1;
    white-space: normal;
    word-wrap: break-word;
}

.completed-question-item.collapsed .q-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.completed-question-item .expand-toggle {
    flex-shrink: 0;
    color: #00629E;
    font-size: 0.85rem;
    margin-left: 4px;
    font-weight: 600;
}

.completed-question-item .edit-icon-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    width: 20px;
    height: 20px;
}

.completed-question-item:hover .edit-icon-btn {
    opacity: 1;
}

.completed-question-item .edit-icon-btn:hover svg path {
    stroke: #035D7D;
    stroke-width: 2;
}

.completed-question-item .edit-icon-btn:focus {
    outline: 2px solid #00629E;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Invalidated template styles - show with red X and restrict editing */
.completed-question-item.invalidated {
    background-color: #fff5f5;
    border-left-color: #dc3545;
    cursor: default;
}

.completed-question-item.invalidated:hover {
    background-color: #ffe6e6;
    border-left-color: #c82333;
}

.completed-question-item .invalidated-mark {
    color: #dc3545;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.completed-question-item .invalidated-text {
    color: #6c757d;
    font-style: italic;
}

@media (prefers-color-scheme: dark) {
    .completed-question-item.invalidated {
        background-color: #3a2020;
        border-left-color: #ff6b6b;
    }
    
    .completed-question-item.invalidated:hover {
        background-color: #4a2a2a;
        border-left-color: #ff8585;
    }
    
    .completed-question-item .invalidated-mark {
        color: #ff6b6b;
    }
    
    .completed-question-item .invalidated-text {
        color: #999;
    }
}

.help-text-section {
    padding: 16px;
    background-color: #e6f2f8;
    border-radius: 4px;
    margin-bottom: 16px;
}

.help-text-content {
    line-height: 1.5;
    color: #001d34;
}

.help-text-content strong {
    font-weight: 700;
    color: #00629E;
}

.help-text-content em {
    font-style: italic;
    color: #035D7D;
}

.help-text-content h4,
.help-text-content h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #00629E;
    margin: 6px 0 4px 0;
}

.help-text-content p {
    margin: 4px 0;
}

.help-text-content ul,
.help-text-content ol {
    margin: 4px 0;
    padding-left: 2rem;
}

.help-text-content li {
    margin: 2px 0;
}


.help-text-content a {
    color: #00629E;
    text-decoration: underline;
    font-weight: 500;
}

.help-text-content a:hover {
    color: #035D7D;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    position: relative;
}

/* ============================================
   Template Title & Description
   ============================================ */

.template-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #001d34;
    margin: 0 0 16px 0;
    font-family: PlusJakartaSans, sans-serif;
    letter-spacing: -0.5px;
}

.template-description {
    font-size: 1.05rem;
    color: #4a5568;
    margin: 12px 0 20px 0;
    font-style: normal;
    line-height: 1.6;
}

/* ============================================
   Question Card Styling
   ============================================ */

.question-card {
    padding: 24px;
    border: 1px solid #dfe8ff;
    border-radius: 0.375rem;
    background: linear-gradient(to bottom right, #fafbfe 0%, #fafafa 100%);
    margin-bottom: 12px;
    animation: slideUp 0.3s ease-in-out;
    box-shadow: 0 1px 3px 1px rgba(0, 29, 52, 0.1);
    transition: all 0.2s ease;
}

    .question-card:hover {
        box-shadow: 0 0 0 3px rgba(0, 98, 58, 0.2), 0 4px 16px rgba(0, 98, 158, 0.15);
    }

.question-card.question-highlight {
    border-color: #00629E;
    box-shadow: 0 0 0 3px rgba(0, 98, 158, 0.2), 0 2px 8px rgba(0, 98, 158, 0.15);
    background: linear-gradient(to bottom right, #f0f6ff 0%, #fafafa 100%);
}

.question-card.answered {
    opacity: 0.9;
    background-color: #f8f9fc;
    pointer-events: auto;
}

.question-card.answered .question-fieldset {
    pointer-events: none;
    opacity: 0.8;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.question-card.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* ============================================
   Question Header & Labels
   ============================================ */

.question-header {
    margin-bottom: 16px;
}

.question-label {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #001d34;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: PlusJakartaSans, sans-serif;
}

.required-indicator {
    color: #A51D2B;
    font-weight: bold;
    font-size: 18px;
}

.question-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* ============================================
   Radio Button Styling
   ============================================ */

.radio-button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.radio-input {
    margin-top: 4px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #00629E;
}

.radio-input:focus {
    outline: 2px solid #00629E;
    outline-offset: 2px;
    border-radius: 50%;
}

.radio-label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #001d34;
    line-height: 1.5;
    padding-top: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.radio-label:hover {
    color: #00629E;
}

.option-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    background-color: #00629E;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
}

.option-help-icon:hover {
    background-color: #035D7D;
    transform: scale(1.1);
}

.option-help-icon:focus {
    outline: 2px solid #CFE5FF;
    outline-offset: 2px;
}

/* Help text modal */
.help-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.help-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-content {
    background-color: white;
    padding: 24px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dfe8ff;
}

.help-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #001d34;
    margin: 0;
}

.help-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-close:hover {
    color: #00629E;
}

.help-modal-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #001d34;
}

.help-modal-body strong {
    color: #00629E;
    font-weight: 600;
}

.help-modal-body em {
    color: #035D7D;
    font-style: italic;
}

.option-help-text {
    display: none;
}

/* ============================================
   Checkbox List Styling
   ============================================ */

.checkbox-list-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.btn-select-all,
.btn-clear-all {
    background: none;
    border: none;
    color: #00629E;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-select-all:hover,
.btn-clear-all:hover {
    color: #035D7D;
}

.btn-select-all:focus,
.btn-clear-all:focus {
    outline: 2px solid #00629E;
    outline-offset: 2px;
    border-radius: 2px;
}

.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-input {
    margin-top: 4px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #00629E;
}

.checkbox-input:focus {
    outline: 2px solid #00629E;
    outline-offset: 2px;
}

.checkbox-label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #001d34;
    line-height: 1.5;
    padding-top: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.checkbox-label:hover {
    color: #00629E;
}

/* ============================================
   Text Input Styling
   ============================================ */

.text-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-input-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
}

.text-input {
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 2px solid #dfe8ff;
    border-radius: 0.375rem;
    font-family: PlusJakartaSans, sans-serif;
    color: #001d34;
    background-color: #fafbfc;
    transition: all 0.2s ease;
}

.text-input:focus {
    outline: none;
    border-color: #00629E;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 98, 158, 0.08);
}

.text-input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    color: #999;
    border-color: #e0e0e0;
}

.text-input[required]:invalid:not(:placeholder-shown) {
    border-color: #A51D2B;
}

/* ============================================
   Error Styling
   ============================================ */

.question-error {
    display: none;
    margin-top: 8px;
    padding: 10px;
    background-color: #fce8eb;
    border: 1px solid #f5c6cc;
    border-radius: 0.375rem;
    color: #A51D2B;
    font-size: 0.875rem;
}

.question-error.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.error-text {
    display: block;
}

/* ============================================
   Loading & Spinner
   ============================================ */

#loading-spinner {
    text-align: center;
    padding: 20px;
    font-size: 0.95rem;
    color: #001d34;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 29, 52, 0.1);
    border-radius: 50%;
    border-top-color: #00629E;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Buttons & Button Groups
   ============================================ */

.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    clear: both;
    width: 100%;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 0;
    overflow: hidden;
}

.button-group::after {
    content: "";
    display: table;
    clear: both;
}

.float-start {
    float: left !important;
}

.float-end {
    float: right !important;
}

.m-1 {
    margin: 8px !important;
}

.btn-primary,
#complete-button {
    padding: 12px 28px;
    background: linear-gradient(135deg, #00629E 0%, #035D7D 100%);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 98, 158, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover,
#complete-button:hover {
    background: linear-gradient(135deg, #035D7D 0%, #024659 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 98, 158, 0.4);
}

.btn-primary:focus,
#complete-button:focus {
    outline: 2px solid #CFE5FF;
    outline-offset: 2px;
    background: linear-gradient(135deg, #035D7D 0%, #024659 100%);
}

.btn-primary:active,
#complete-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 98, 158, 0.3);
}

.btn-primary:disabled,
#complete-button:disabled {
    background: linear-gradient(135deg, #bbb 0%, #999 100%);
    cursor: not-allowed;
    color: #f0f0f0;
    box-shadow: none;
    transform: none;
}

/* ============================================
   Alert Styling
   ============================================ */

#error-message {
    padding: 12px;
    background-color: #fce8eb;
    border: 1px solid #f5c6cc;
    border-radius: 0.375rem;
    color: #A51D2B;
    font-size: 0.95rem;
}

@media (prefers-color-scheme: dark) {
    #error-message {
        background-color: #3d1f1f;
        border-color: #7d4545;
        color: #ff6b6b;
    }
}

.alert {
    padding: 12px;
    border-radius: 0.375rem;
    margin-bottom: 12px;
}

.alert-danger {
    background-color: #fce8eb;
    border: 1px solid #f5c6cc;
    color: #A51D2B;
}

@media (prefers-color-scheme: dark) {
    .alert-danger {
        background-color: #3d1f1f;
        border-color: #7d4545;
        color: #ff6b6b;
    }
}

.alert-info {
    background-color: #CFE5FF;
    border: 1px solid #b3d9f2;
    color: #035D7D;
}

@media (prefers-color-scheme: dark) {
    .alert-info {
        background-color: #1a3a3d;
        border-color: #2d5f63;
        color: #4dd0e1;
    }
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

@media (prefers-color-scheme: dark) {
    .alert-warning {
        background-color: #3d3520;
        border-color: #7d6f40;
        color: #ffeb3b;
    }
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

@media (prefers-color-scheme: dark) {
    .alert-success {
        background-color: #1e3d20;
        border-color: #3d7d45;
        color: #4caf50;
    }
}

/* ============================================
   Screen Reader Only
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   Accessibility: Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .question-card,
    .question-card.fade-in {
        animation: none;
    }

    .question-error.show {
        animation: none;
    }

    .spinner {
        animation: none;
        border-top-color: transparent;
        border-right-color: #00629E;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Large desktop - narrower sidebar */
@media (max-width: 1200px) {
    .wizard-layout {
        grid-template-columns: 240px 1fr;
        gap: 20px;
    }

    .wizard-progress-sidebar {
        padding: 16px;
    }
}

/* Tablet/Small screens - switch to single column layout */
@media (max-width: 1024px) {
    .wizard-container {
        margin: 10px;
        padding: 15px;
        max-width: 100%;
    }

    .wizard-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wizard-progress-sidebar {
        position: static;
        background: #f5fafe;
        margin-bottom: 16px;
        padding: 12px 16px;
    }

    /* Hide "Progress" header text on smaller screens */
    .progress-header {
        display: none;
    }

    /* Compact progress bar */
    .progress-bar-container {
        margin-bottom: 8px;
    }

    .progress-bar-label {
        font-size: 0.85rem;
        font-weight: 700;
    }

    .progress-bar {
        height: 10px;
    }

    /* Collapsible Previously Answered section */
    .completed-questions {
        margin-top: 8px;
        padding-top: 8px;
    }

    .completed-questions-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        padding: 8px 0;
        user-select: none;
    }

    .completed-questions-title {
        margin-bottom: 0;
        font-size: 0.8rem;
    }

    .completed-questions-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #00629E;
        color: #fff;
        font-size: 0.9rem;
        font-weight: 700;
        transition: transform 0.2s ease;
    }

    .completed-questions.collapsed .completed-questions-toggle {
        transform: rotate(0deg);
    }

    .completed-questions:not(.collapsed) .completed-questions-toggle {
        transform: rotate(180deg);
    }

    .completed-questions-list {
        max-height: 500px;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease;
    }

    .completed-questions.collapsed .completed-questions-list {
        max-height: 0;
        opacity: 0;
    }

    .completed-questions:not(.collapsed) .completed-questions-list {
        opacity: 1;
    }

    .completed-question-item {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .question-card {
        padding: 16px;
    }

    .question-label {
        font-size: 0.95rem;
    }

    .cards-container {
        gap: 12px;
    }

    .radio-option,
    .checkbox-option {
        gap: 10px;
    }

    .option-help-text {
        margin-left: 28px;
    }

    .btn-primary,
    #complete-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wizard-container {
        margin: 5px;
        padding: 12px;
    }

    .wizard-progress-sidebar {
        padding: 10px 12px;
    }

    .question-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .question-label {
        font-size: 0.9rem;
    }

    .help-text-content {
        font-size: 0.75rem;
    }

    .template-title {
        font-size: 1.5rem;
    }

    .btn-primary,
    #complete-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .checkbox-controls {
        flex-wrap: wrap;
    }

    .completed-question-item {
        font-size: 0.7rem;
        padding: 6px 8px;
    }

    .completed-questions-title {
        font-size: 0.75rem;
    }

    .completed-questions-toggle {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }

    /* Show count badge on mobile */
    .completed-questions-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        background: #218739;
        color: #fff;
        border-radius: 10px;
        font-size: 0.7rem;
        font-weight: 700;
        margin-left: 8px;
    }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .wizard-container {
        background-color: #1e1e1e;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .question-card {
        background: linear-gradient(to bottom right, #2a2a2a 0%, #242424 100%);
        border-color: #444;
    }

        .question-card.answered {
            background: #1a1a1a;
        }

        .question-card:hover {
            box-shadow: 0 0 0 3px rgba(95, 179, 213, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
        }

        .question-card.question-highlight {
            border-color: #5fb3d5;
            box-shadow: 0 0 0 3px rgba(95, 179, 213, 0.2), 0 2px 8px rgba(95, 179, 213, 0.15);
            background: linear-gradient(to bottom right, #1e2d3d 0%, #242424 100%);
        }

    .question-label {
        color: #f0f0f0;
    }
    .question-label {
        color: #f0f0f0;
    }

    .help-text-content {
        color: #aaa;
    }

    .radio-label,
    .checkbox-label {
        color: #f0f0f0;
    }

    .radio-label:hover,
    .checkbox-label:hover {
        color: #5fb3d5;
    }

    .text-input {
        background-color: #333;
        border-color: #555;
        color: #f0f0f0;
    }

    .text-input:focus {
        border-color: #5fb3d5;
        box-shadow: 0 0 0 3px rgba(95, 179, 213, 0.1);
    }

    #error-message,
    .alert-danger {
        background-color: #3d2424;
        border-color: #5d3a3a;
        color: #ff8a8a;
    }

    .help-text-section {
        background-color: #1a2a33;
    }

    .help-text-content {
        color: #ccc;
    }

    .help-text-content strong {
        color: #5fb3d5;
    }

    .help-text-content em {
        color: #7cc5e0;
    }

    .help-text-content h4,
    .help-text-content h5 {
        color: #4da6ff;
    }

    .help-text-content a {
        color: #5fb3d5;
    }

    .help-text-content a:hover {
        color: #7cc5e0;
    }
    .wizard-progress-sidebar {
        background: linear-gradient(135deg, #1a2a3a 0%, #222d3a 100%);
        border-color: #3a4a5a;
        box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.3);
        border-radius: 0.375rem;
        padding: 20px;
        position: sticky;
        top: 120px;
        height: fit-content;
    }
    .progress-header h2 {
        color: #4da6ff;
        border-bottom: 2px solid #4da6ff;
    }
    .progress-bar-label {
        color: #e0e0e0;
    }

        .progress-bar-label .percentage {
            color: #5fb3d5;
        }

    .progress-bar {
        background-color: #3a3a3a;
    }

    .progress-bar-fill {
        background: linear-gradient(90deg, #5fb3d5 0%, #4da6ff 100%);
    }

    .completed-questions {
        border-top: 1px solid #3a4a5a;
    }
}

/* ============================================
   Multi-Conditional Field States
   ============================================ */



.field-readonly:focus,
input:read-only:focus,
textarea:read-only:focus {
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 29, 52, 0.1);
}

/* Disabled field styling */
.field-disabled,
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.field-disabled:hover,
input:disabled:hover,
textarea:disabled:hover,
select:disabled:hover {
    border-color: #d0d0d0;
}

/* Visual feedback for multi-conditional state change */
.field-readonly,
.field-disabled {
    transition: all 0.2s ease-in-out;
}

/* Help text for disabled/readonly fields */
.field-disabled::after,
.field-readonly::after {
    content: attr(data-disabled-reason);
    display: block;
    font-size: 0.85rem;
    color: #A51D2B;
    margin-top: 4px;
}

/* ============================================
   NAICS Typeahead Dropdown Styling
   ============================================ */

.naics-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #00629E;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 29, 52, 0.2);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: 2px;
    display: none;
}

.naics-dropdown-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.naics-dropdown-item:last-child {
    border-bottom: none;
}

.naics-dropdown-item:hover {
    background-color: #f5f9ff;
}

.naics-dropdown-item.naics-no-results {
    cursor: default;
    text-align: center;
    color: #999;
    padding: 16px;
}

.naics-code {
    font-weight: 700;
    color: #00629E;
    font-size: 0.9rem;
}

.naics-label {
    font-weight: 600;
    color: #001d34;
    font-size: 0.95rem;
    margin-top: 2px;
}

.naics-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* Selected NAICS items container */
.naics-selected-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    min-height: 0;
}

/* NAICS badge/pill styling */
.naics-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00629E;
    color: #fff;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #004a7a;
    box-shadow: 0 1px 3px rgba(0, 29, 52, 0.2);
}

.naics-badge-text {
    flex: 1;
}

.naics-badge-remove {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.naics-badge-remove:hover {
    opacity: 1;
}

.naics-badge-remove:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* NAICS Exception badge styling - for custom user-entered descriptions */
.naics-badge-exception {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border: 1px dashed #ffc107;
    box-shadow: 0 1px 3px rgba(133, 100, 4, 0.2);
}

.naics-badge-exception .naics-badge-text strong {
    color: #856404;
}

.naics-badge-exception .naics-badge-remove {
    color: #856404;
}

.naics-badge-exception .naics-badge-remove:hover {
    color: #533f03;
}

.naics-badge-exception .naics-badge-remove:focus {
    outline: 2px solid rgba(133, 100, 4, 0.5);
}

/* NAICS "Add Custom" dropdown item styling */
.naics-add-custom {
    cursor: pointer;
    background: #fff8e1;
    border-left: 3px solid #ffc107;
}

.naics-add-custom:hover {
    background: #ffecb3;
}

.naics-add-custom .naics-label {
    color: #856404;
    font-weight: 600;
}

.naics-add-custom .naics-desc {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

/* ============================================
   Condition Evaluator - VisibleIf/RequiredIf
   ============================================ */

/* Questions or options hidden by VisibleIf conditions */
.condition-hidden {
    display: none !important;
}

/* Question cards hidden by conditions */
.question-card.condition-hidden {
    display: none !important;
}

/* Radio option hidden by conditions */
.radio-option.condition-hidden {
    display: none !important;
}

/* Checkbox option hidden by conditions */
.checkbox-option.condition-hidden {
    display: none !important;
}

/* Dropdown option hidden by conditions */
select option.condition-hidden {
    display: none !important;
}

/* Option marked as required due to RequiredIf condition */
.option-required {
    font-weight: 600;
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 0.25rem;
}

/* Ensure smooth transitions when visibility changes */
.question-card,
.radio-option,
.checkbox-option,
select option {
    transition: all 0.2s ease;
}

/* ============================================
   Restricted Word Results Styling
   ============================================ */

.restricted-word-results {
    margin-top: 1rem;
    padding: 0;
    border-left: 4px solid #946F00;
}

.restricted-word-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #fff9e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.restricted-word-item:last-child {
    margin-bottom: 0;
}

.restricted-word-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.restricted-word-content {
    flex: 1;
}

.restricted-word-content p {
    margin: 0 0 0.5rem 0;
}

.restricted-word-content p:last-child {
    margin-bottom: 0;
}

.restricted-word-main {
    font-weight: 600;
    color: #755800;
    font-size: 0.95rem;
}

.restricted-word-detail {
    font-size: 0.9rem;
    color: #001d34;
    line-height: 1.6;
}

.restricted-word-contact {
    font-size: 0.9rem;
    color: #00629E;
    padding: 0.5rem;
    background-color: #f0f7ff;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

/* Full message display with preserved formatting */
.restricted-word-message {
    font-size: 0.9rem;
    color: #001d34;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   Name Availability Results Styling
   ============================================ */

.name-availability-results {
    margin-top: 1rem;
    padding: 0;
    border-left: 4px solid #047d89;
}

.name-availability-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.375rem;
}

@media (prefers-color-scheme: dark) {
    .name-availability-item {
        background-color: transparent;
    }
}

.name-availability-item:last-child {
    margin-bottom: 0;
}

.name-availability-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.name-availability-content {
    flex: 1;
}

@media (prefers-color-scheme: dark) {
    .name-availability-content {
        color: #e0e0e0;
    }
}

.name-availability-message {
    font-size: 0.9rem;
    color: #001d34;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* Alert variant colors */
.name-availability-results.alert-success {
    background-color: #d1e7dd;
    border-left-color: #218739;
}

.name-availability-results.alert-success .name-availability-icon {
    color: #218739;
}

.name-availability-results.alert-danger {
    background-color: #f8d7da;
    border-left-color: #f5222d;
}

.name-availability-results.alert-danger .name-availability-icon {
    color: #f5222d;
}

.name-availability-results.alert-warning {
    background-color: #fff3cd;
    border-left-color: #946F00;
}

.name-availability-results.alert-warning .name-availability-icon {
    color: #946F00;
}
.qa-top-margin {
    margin-top: 100px;
}

@media (prefers-color-scheme: dark) {
    .kds-button-outlined {
        background-color: transparent;
        color: #5fb3d5;
        border: 2px solid #5fb3d5;
        transition: all 0.2s ease;
    }

    .kds-button-outlined:hover {
        background-color: rgba(95, 179, 213, 0.15);
        color: #7cc5e0;
        border-color: #7cc5e0;
    }

    .kds-button-outlined:focus {
        outline: 2px solid #4da6ff;
        outline-offset: 2px;
        border-color: #7cc5e0;
    }

    .kds-button-outlined:active {
        background-color: rgba(95, 179, 213, 0.25);
        color: #4da6ff;
        border-color: #4da6ff;
    }

    .kds-button-outlined:disabled {
        background-color: transparent;
        color: #555;
        border-color: #555;
        cursor: not-allowed;
        opacity: 0.6;
    }
}