/* Survey Display CSS - Shared between preview and live surveys */

/* Survey Container & Layout */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.survey-header {
    background: var(--banner-color);
    color: var(--accent-color);
    padding: 2rem;
    text-align: center;
    font-family: inherit;
}

.survey-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.survey-intro {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.survey-content {
    padding: 2rem;
}

/* Survey Steps & Navigation */
.survey-step {
    display: none;
}

.survey-step.active {
    display: block;
}

.web-content-block {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.web-content-block.intro h2,
.web-content-block.compliance h2,
.web-content-block.completion h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    margin-bottom: 1rem;
    color: #1f2937;
}

.web-content-block.intro p,
.web-content-block.compliance p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.web-content-block.completion p {
    font-size: 1rem;
    color: #000000 !important;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.survey-navigation {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-indicator {
    display: none;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn.prev-btn {
    background: #6b7280;
    color: white;
}

.nav-btn.prev-btn:hover:not(:disabled) {
    background: #4b5563;
}

.nav-btn.next-btn,
.nav-btn.continue-btn {
    background: var(--banner-color, #a8c8a4);
    color: var(--accent-color, #ffffff);
}

.nav-btn.next-btn:hover,
.nav-btn.continue-btn:hover {
    opacity: 0.9;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Questions */
.question-container {
    display: none;
    margin-bottom: 2rem;
}

.question-container.active {
    display: block;
}

.question-item {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.question-description {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.required-indicator {
    color: #dc2626;
    margin-left: 0.25rem;
}

/* Question Inputs */
.question-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

.question-input:focus {
    outline: none;
    border-color: var(--banner-color, #a8c8a4);
}

/* Question Options */
.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: block;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
    box-sizing: border-box;
}

.option-item:hover {
    border-color: var(--banner-color, #a8c8a4);
    background: #f9fafb;
}

.option-item.selected {
    border-color: var(--banner-color, #a8c8a4);
    background: rgba(168, 200, 164, 0.15);
}

.option-input {
    margin-right: 0.75rem;
}

.option-label {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: #e5e7eb;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--banner-color, #a8c8a4);
    transition: width 0.3s;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Completion Screen */
.completion-message {
    text-align: center;
    padding: 3rem 2rem;
    display: none;
}

.completion-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #059669 !important;
}

.completion-text {
    font-size: 1.1rem;
    color: #6b7280 !important;
    line-height: 1.6;
}

/* Error Messages */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

/* Question Error Highlight */
.question-item.has-error {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    animation: errorPulse 0.5s ease-in-out;
}

.question-item.has-error .question-text {
    color: #dc2626;
}

@keyframes errorPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* Start Screen */
.start-screen {
    text-align: center;
    padding: 3rem 2rem;
}

.start-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    margin-bottom: 1rem;
}

.start-description {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Button Variations */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--banner-color, #a8c8a4);
    color: var(--accent-color, #ffffff);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Questions Page Specific */
.questions-page {
    min-height: 300px;
    text-align: left;
}

.questions-page .question-options {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.questions-page .question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.questions-page .question-description {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Ranking Questions */
.ranking-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ranking-option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.ranking-option-row:hover {
    background-color: #f9fafb;
}

.drag-handle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    cursor: grab;
    color: #9ca3af;
    transition: color 0.15s ease;
    padding: 0.25rem;
    border-radius: 4px;
}

.drag-handle-icon:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.drag-handle-icon:active {
    cursor: grabbing;
}

.ranking-option-text {
    flex: 1;
    font-size: 1rem;
    color: #374151 !important;
    font-weight: 500;
}

.ranking-option-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 640px) {
    .survey-container {
        margin: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .survey-content {
        padding: 1rem;
    }

    .web-content-block {
        padding: 1.5rem;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
    }

    .survey-navigation {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .progress-indicator {
        text-align: center;
    }
}
