/* Modern Questionnaire Form Styling */

/* Base container styling */
.questionnaire-section {
    background-color: #f8fafc;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.dark-theme .questionnaire-section {
    background-color: #0f172a;
}

.questionnaire-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: var(--gray-color);
}

.dark-theme .questionnaire-intro {
    color: #94a3b8;
}

.questionnaire-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 30, 80, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.questionnaire-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 30, 80, 0.12);
}

.dark-theme .questionnaire-container {
    background: #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Progress indicator styling */
.progress-container {
    padding: 30px 30px 0;
    position: relative;
}

.progress-bar {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    position: relative;
    margin-bottom: 30px;
}

.dark-theme .progress-bar {
    background-color: #334155;
}

.progress-fill {
    position: absolute;
    height: 100%;
    width: 25%; /* Will be updated via JS */
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 0 5%;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.dark-theme .step-indicator {
    background-color: #334155;
    color: #94a3b8;
}

.progress-step.active .step-indicator {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
    transform: scale(1.1);
}

.dark-theme .progress-step.active .step-indicator {
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.3);
}

.progress-step.completed .step-indicator {
    background: var(--success-color);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.3s ease;
}

.dark-theme .step-label {
    color: #94a3b8;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.dark-theme .progress-step.active .step-label {
    color: var(--secondary-color);
}

/* Form styling */
.questionnaire-form {
    padding: 20px 30px 40px;
    position: relative;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

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

.step-title {
    margin-bottom: 30px;
    font-size: 1.4rem;
    color: var(--dark-color);
    font-weight: 600;
}

.dark-theme .step-title {
    color: #e2e8f0;
}

.step-title i {
    margin-right: 10px;
    color: var(--primary-color);
    opacity: 0.8;
}

/* Form fields styling */
.form-field {
    margin-bottom: 28px;
}

.form-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.05rem;
}

.dark-theme .form-field label {
    color: #e2e8f0;
}

.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: var(--dark-color);
}

.dark-theme .form-field input[type="text"],
.dark-theme .form-field textarea {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.form-field input[type="text"]:hover,
.form-field textarea:hover {
    border-color: #cbd5e1;
}

.dark-theme .form-field input[type="text"]:hover,
.dark-theme .form-field textarea:hover {
    border-color: #475569;
}

.form-field input[type="text"]:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: #fff;
}

.dark-theme .form-field input[type="text"]:focus,
.dark-theme .form-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
    background-color: #1e293b;
}

/* Add styles for email inputs to match text inputs */
.form-field input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: var(--dark-color);
}

.dark-theme .form-field input[type="email"] {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.form-field input[type="email"]:hover {
    border-color: #cbd5e1;
}

.dark-theme .form-field input[type="email"]:hover {
    border-color: #475569;
}

.form-field input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: #fff;
}

.dark-theme .form-field input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
    background-color: #1e293b;
}

/* Styling for select dropdowns to match other form fields */
.form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border-color, #ced4da);
    border-radius: var(--border-radius-sm, 4px);
    background-color: var(--input-bg-color, #fff);
    color: var(--text-color, #333);
    font-size: 1rem;
    line-height: 1.5;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E"); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
    cursor: pointer;
}

.form-field select:focus {
    border-color: var(--primary-color, #4361EE);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25); /* Focus glow similar to inputs */
}

/* Adjust icon position if there's an icon in the label */
.form-field label i + select {
    padding-left: 35px; /* If you plan to add icons next to select labels like text inputs */
}

/* Dark theme adjustments for select */
.dark-theme .form-field select {
    background-color: var(--dark-card-bg, #2d3748); /* Updated to use a more standard dark theme variable */
    border-color: var(--dark-border-color, #4a5568); /* Updated to use a more standard dark theme variable */
    color: var(--dark-text-color, #f7fafc);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23f7fafc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E"); /* Custom arrow for dark theme */
}

.dark-theme .form-field select:focus {
    border-color: var(--primary-color, #4361EE);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.35);
    background-color: var(--dark-bg-color); /* Added to ensure focus matches other inputs */
}

/* Styling for social media input fields */
.social-inputs-container {
    padding-top: 15px; /* Add some space when revealed */
}

.social-inputs-container input[type="url"] {
    margin-bottom: 10px; /* Add space between social input fields */
}

.social-inputs-container input[type="url"]:last-child {
    margin-bottom: 0; /* No margin for the last input in the container */
}

/* Ensure social inputs also get the standard input styling if not already covered */
.form-field .social-inputs-container input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border-color, #ced4da);
    border-radius: var(--border-radius-sm, 4px);
    background-color: var(--input-bg-color, #fff);
    color: var(--text-color, #333);
    font-size: 1rem;
    line-height: 1.5;
    box-sizing: border-box; /* Ensure padding and border don't increase width */
}

.form-field .social-inputs-container input[type="url"]:focus {
    border-color: var(--primary-color, #4361EE);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

[data-theme="dark"] .form-field .social-inputs-container input[type="url"] {
    background-color: var(--dark-input-bg, #2d3748);
    border-color: var(--dark-input-border, #4a5568);
    color: var(--dark-text-color, #f7fafc);
}

[data-theme="dark"] .form-field .social-inputs-container input[type="url"]:focus {
    border-color: var(--primary-color, #4361EE);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.35);
}

/* Styles for conditional input sections */
.conditional-fields-container {
    background-color: #f8f9fa; /* Light background to differentiate */
    border: 1px solid #e0e0e0; /* Subtle border */
    border-radius: 8px; /* Rounded corners */
    padding: 20px; /* Inner spacing */
    margin-top: 15px; /* Space above the container */
    margin-bottom: 20px; /* Space below the container */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
}

.dark-theme .conditional-fields-container {
    background-color: #1e293b; /* Darker background for container */
    border-color: #334155; /* Darker border */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); /* Adjusted shadow for dark theme */
}

.conditional-section-title {
    font-size: 1.1rem; /* Slightly larger than standard labels */
    font-weight: 600; /* Bolder text */
    color: #343a40; /* Darker color for the title */
    margin-bottom: 15px; /* Space below the title */
    padding-bottom: 10px; /* Space below the text, before the border */
    border-bottom: 1px solid #ced4da; /* Separator line */
    display: flex; /* Align icon and text */
    align-items: center; /* Center items vertically */
}

.dark-theme .conditional-section-title {
    color: #cbd5e1; /* Lighter text color for title */
    border-bottom-color: #334155; /* Darker separator line */
}

.conditional-section-title i {
    margin-right: 8px; /* Space between icon and text */
    color: var(--primary-color, #4361EE); /* Use primary color for icon */
}

.dark-theme .conditional-section-title i {
    color: var(--secondary-color, #4CC9F0); /* Ensure icon color is visible, perhaps use secondary or a lighter primary variant */
}

/* Styling for the remove button in dynamic entries */
.btn-remove-item {
    background-color: #dc3545; /* Red color for removal */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex; /* Align icon and text */
    align-items: center;
    margin-top: 10px; /* Space above the button */
}

.btn-remove-item i {
    margin-right: 5px;
}

.btn-remove-item:hover {
    background-color: #c82333; /* Darker red on hover */
}

/* Styling for the add more button */
.btn-add-more {
    margin-top: 10px; /* Space above the button */
    display: inline-flex; /* Align icon and text */
    align-items: center;
    padding: 8px 15px; /* Adjust padding */
    font-size: 0.95rem; /* Adjust font size */
}

.btn-add-more i {
    margin-right: 6px; /* Space between icon and text */
}

/* Adjust spacing for pricing plan entries for better visual separation */
.pricing-plan-entry,
.testimonial-entry,
.faq-entry {
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    margin-bottom: 15px;
    background-color: #fff; /* White background for each entry */
}

.dark-theme .pricing-plan-entry,
.dark-theme .testimonial-entry,
.dark-theme .faq-entry {
    background-color: #161e2b; /* Slightly different background for entries in dark mode */
    border-color: #2c3a4f; /* Darker dashed border for entries */
}

/* Styles for the price field group */
.price-field-group {
    display: flex;
    align-items: center; /* Align items vertically */
    gap: 10px; /* Space between elements */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.price-field-group label {
    margin-bottom: 0; /* Remove bottom margin as it's now inline */
    flex-shrink: 0; /* Prevent label from shrinking */
}

.price-field-group input[type="number"] {
    flex-grow: 1; /* Allow price input to take available space */
    min-width: 80px; /* Minimum width for the price input */
    width: auto; /* Override 100% width from general input styles */

    /* Added styles for consistency with other inputs */
    padding: 15px; /* Consistent with text inputs */
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f8fafc;
    color: var(--dark-color);
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding/border don't add to flex item's base size unexpectedly */
}

.price-field-group input[type="number"]:hover {
    border-color: #cbd5e1;
}

.price-field-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: #fff;
}

/* Dark theme adjustments for price input[type="number"] */
.dark-theme .price-field-group input[type="number"] {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .price-field-group input[type="number"]:hover {
    border-color: #475569;
}

.dark-theme .price-field-group input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
    background-color: #1e293b;
}

.price-field-group select {
    flex-grow: 1; /* Allow selects to take available space */
    min-width: 100px; /* Minimum width for selects */
    width: auto; /* Override 100% width from general select styles */
}

/* Adjustments for smaller screens if needed */
@media (max-width: 480px) {
    .price-field-group {
        flex-direction: column; /* Stack elements vertically */
        align-items: stretch; /* Stretch items to full width */
    }

    .price-field-group label {
        margin-bottom: 5px; /* Add some space below label when stacked */
    }

    .price-field-group input[type="number"],
    .price-field-group select {
        width: 100%; /* Make inputs and selects full width when stacked */
    }
}

.pricing-plan-entry:last-child,
.testimonial-entry:last-child,
.faq-entry:last-child {
    margin-bottom: 0; /* No bottom margin for the last entry before the "Add Another" button */
}

/* Styling for the toggle header */
.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px; /* Increased padding */
    cursor: pointer;
    border: 1px solid #e2e8f0; /* Full border */
    border-radius: 8px; /* Rounded corners */
    background-color: #f8fafc; /* Slightly distinct background */
    box-shadow: 0 2px 4px rgba(0, 20, 60, 0.05), 0 1px 2px rgba(0, 20, 60, 0.04); /* Modern shadow */
    margin-bottom: 0; /* Keep default form-field margin from parent */
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark-theme .toggle-header {
    background-color: #252e3e; /* Adjusted for dark theme */
    border-color: #334155;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-header:hover,
.toggle-header:focus-visible { /* Using focus-visible */
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 3px 6px rgba(0, 20, 60, 0.07), 0 1px 3px rgba(0, 20, 60, 0.06), 0 0 0 1px var(--primary-color); /* Enhanced shadow and ring */
}

.dark-theme .toggle-header:hover,
.dark-theme .toggle-header:focus-visible {
    border-color: var(--primary-color);
    background-color: #2a3647;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--primary-color);
}

.toggle-header[aria-expanded="true"] {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 20, 60, 0.05) inset, 0 0 0 1px var(--primary-color); /* Inset shadow and border emphasis */
}

.dark-theme .toggle-header[aria-expanded="true"] {
    background-color: #2a3647;
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset, 0 0 0 1px var(--primary-color);
}

.toggle-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.05rem;
    /* No margin-bottom needed as it's part of flex */
}

.dark-theme .toggle-label {
    color: #e2e8f0;
}

.toggle-icon {
    font-size: 0.9em;
    color: var(--gray-color);
    transition: transform 0.3s ease;
}

.dark-theme .toggle-icon {
    color: #94a3b8;
}

.toggle-header[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.field-note {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

.dark-theme .field-note {
    color: #94a3b8;
}

/* Selling points styling */
.selling-points-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selling-point {
    display: flex;
    align-items: center;
    gap: 12px;
}

.point-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Color picker styling */
.color-selection {
    margin-top: 30px;
}

.color-pickers {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.color-picker {
    flex: 1;
}

.color-label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.dark-theme .color-label {
    color: #e2e8f0;
}

.color-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-inputs input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px;
    background: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dark-theme .color-inputs input[type="color"] {
    border-color: #334155;
}

.color-inputs input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-inputs input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-inputs input[type="color"]:hover {
    transform: scale(1.05);
}

.color-inputs input[type="text"] {
    flex: 1;
    max-width: 120px;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', monospace;
    text-transform: uppercase;
}

.dark-theme .color-inputs input[type="text"] {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

/* Checkbox styling */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    color: var(--dark-color);
}

.dark-theme .checkbox-container {
    color: #e2e8f0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dark-theme .checkmark {
    background-color: #0f172a;
    border-color: #475569;
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.ai-color-suggestion {
    margin-top: 15px;
}

/* Custom File Upload Button */
.file-upload-input {
    display: none; /* Hide the actual file input */
}

.file-upload-label {
    display: inline-block;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius-md, 0.375rem);
    background-color: var(--input-bg, #fff);
    color: var(--text-color, #333);
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.file-upload-label:hover {
    background-color: var(--input-hover-bg, #f8f9fa);
    border-color: var(--input-focus-border, #86b7fe);
}

.file-upload-label i {
    margin-right: 8px;
}

.file-name-display {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
}

/* Ensure dark theme compatibility for file upload label */
body.dark-theme .file-upload-label {
    background-color: var(--dark-input-bg, #2b3035);
    border-color: var(--dark-border-color, #444c56);
    color: var(--dark-text-color, #c9d1d9);
}

body.dark-theme .file-upload-label:hover {
    background-color: var(--dark-input-hover-bg, #32383e);
    border-color: var(--dark-input-focus-border, #58a6ff);
}

body.dark-theme .file-name-display {
    color: var(--dark-text-muted, #8b949e);
}

/* Sections grid styling */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.section-option {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.dark-theme .section-option {
    background-color: #1e293b;
    border-color: #334155;
}

.section-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.section-name {
    margin-left: 5px;
}

.section-name i {
    margin-right: 5px;
    color: var(--primary-color);
    opacity: 0.8;
}

/* Form navigation buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    gap: 8px;
}

.btn-prev {
    background-color: #f1f5f9;
    color: var(--dark-color);
}

.dark-theme .btn-prev {
    background-color: #334155;
    color: #e2e8f0;
}

.btn-prev:hover {
    background-color: #e2e8f0;
}

.dark-theme .btn-prev:hover {
    background-color: #475569;
}

.btn-next {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.btn-generate:active {
    transform: translateY(1px);
}

.btn-generate .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-generate .btn-icon i {
    font-size: 1.2rem;
}

/* Generation overlay */
.generation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.generation-overlay.active {
    opacity: 1;
    visibility: visible;
}

.generation-modal {
    background-color: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.dark-theme .generation-modal {
    background-color: #1e293b;
}

.generation-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.generation-modal h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.dark-theme .generation-modal h3 {
    color: var(--secondary-color);
}

.generation-step {
    color: var(--gray-color);
    font-size: 1.05rem;
}

.dark-theme .generation-step {
    color: #94a3b8;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preview Section Placeholder Styling */
.preview-section .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.preview-placeholder-content {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #e2e8f0; /* Light border for the placeholder area */
    border-radius: 8px;
    margin-bottom: 30px;
    background-color: #f8fafc; /* Light background for placeholder */
}

.dark-theme .preview-placeholder-content {
    border-color: #334155;
    background-color: #1e293b; /* Dark background for placeholder */
}

.preview-placeholder-text {
    font-size: 1.1rem;
    color: #64748b;
    margin-top: 0; /* Lottie player has bottom margin */
}

.dark-theme .preview-placeholder-text {
    color: #94a3b8;
}

/* Style for the Lottie animation player */
.preview-placeholder-content dotlottie-player {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px; /* Center it and add some margin below */
}

#page-preview {
    width: 100%;
    min-height: 500px; /* Ensure it has some height when content loads */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    /* Initially hidden by JS or by not having content */
}

.dark-theme #page-preview {
    border-color: #334155;
}

.download-buttons {
    text-align: center;
    margin-top: 20px;
    /* display: none; Initially hidden, shown by JS */
}

.download-buttons .btn {
    margin: 0 10px;
}

/* Ensure iframe is hidden when it has no src or content yet, and placeholder is visible */
#page-preview:not([srcdoc]) {
    display: none; /* Hide iframe if it has no content yet */
}

/* Icon-based Radio Button Styling */
.icon-radio-group {
    display: flex;
    gap: 10px; /* Space between radio options */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens if needed */
}

.icon-radio-label {
    display: inline-flex; /* Align icon and text within the label */
    align-items: center; /* Vertically center icon and text */
    padding: 10px 15px;
    border: 2px solid #e2e8f0; /* Default border */
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    background-color: #f8fafc;
    color: var(--dark-color); /* Default text color for the label */
    position: relative; /* For focus styling */
}

.dark-theme .icon-radio-label {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.icon-radio-label:hover {
    border-color: var(--primary-color);
    background-color: #eff3fe; /* Lighter primary shade for hover */
}

.dark-theme .icon-radio-label:hover {
    border-color: var(--primary-color);
    background-color: #1c2744; /* Darker shade for hover in dark mode */
}

.icon-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.icon-radio-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px; /* Space between icon and text */
    font-size: 1.1rem; /* Icon size */
    transition: color 0.3s ease;
}

.icon-radio-text {
    font-size: 0.95rem;
    line-height: 1.2; /* Adjust for vertical alignment with icon */
    transition: color 0.3s ease, font-weight 0.3s ease;
}

/* Checked State Styling */
.icon-radio-label input[type="radio"]:checked + .icon-radio-custom {
    color: var(--primary-color);
}

.dark-theme .icon-radio-label input[type="radio"]:checked + .icon-radio-custom {
    color: var(--secondary-color); /* Ensure visibility in dark mode */
}

.icon-radio-label input[type="radio"]:checked + .icon-radio-custom + .icon-radio-text {
    color: var(--primary-color);
    font-weight: 600;
}

.dark-theme .icon-radio-label input[type="radio"]:checked + .icon-radio-custom + .icon-radio-text {
    color: var(--secondary-color); /* Ensure visibility */
    font-weight: 600;
}

/* Focus state for accessibility */
.icon-radio-label:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color); /* Reinforce border color on focus */
}

.dark-theme .icon-radio-label:focus-within {
    outline-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Responsive adjustments for icon radio buttons if needed */
@media (max-width: 480px) {
    .icon-radio-group {
        flex-direction: column; /* Stack them on very small screens */
        align-items: stretch; /* Make them full width in column */
    }

    .icon-radio-label {
        justify-content: center; /* Center content if they become full width */
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .questionnaire-container {
        margin: 0 15px;
    }
    
    .progress-container {
        padding: 20px 20px 0;
    }
    
    .questionnaire-form {
        padding: 15px 20px 30px;
    }
    
    .step-indicator {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .color-pickers {
        flex-direction: column;
        gap: 15px;
    }
    
    .sections-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .questionnaire-container { /* Added rule for mobile width */
        margin: 0 5px; /* Reduced side margins for more width */
    }

    .progress-steps {
        margin: 0 2%;
    }
    
    .step-indicator {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-prev, .btn-next, .btn-generate {
        width: 100%;
    }
    
    .sections-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles for AI Content Suggestions in Questionnaire */
.input-with-suggestions {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between input and button */
}

.input-with-suggestions input[type="text"] {
    flex-grow: 1; /* Input takes available space */
}

.btn-ai-suggest {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.btn-ai-suggest .fa-lightbulb {
    margin-right: 5px;
}

.btn-ai-suggest .fa-spinner {
    margin-right: 5px;
}

.suggestions-display-container {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--border-radius-sm, 4px);
    background-color: var(--input-bg-color, #f9f9f9);
    max-height: 200px; /* Limit height and make scrollable if needed */
    overflow-y: auto;
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color-light, #eee);
    transition: background-color 0.2s ease-in-out;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--primary-color-light, #e0e7ff);
    color: var(--primary-color, #4361EE);
}

.loading-suggestions,
.no-suggestions,
.error-suggestions {
    padding: 10px;
    text-align: center;
    color: var(--text-color-secondary, #555);
}

.error-suggestions {
    color: var(--danger-color, #dc3545);
}

/* Dark theme for AI suggestions */
/* .dark-theme .input-group-hero-suggestions input[type="text"] { */
    /* This input is typically within a .form-field, so it should inherit dark theme styles like: */
    /* .dark-theme .form-field input[type="text"] */
    /* Explicit rules can be added if it's styled independently or needs overrides. */
    /* Example: */
    /* background-color: #0f172a; */
    /* border-color: #334155; */
    /* color: #e2e8f0; */
/* } */

/* .dark-theme #get-hero-suggestions-btn { */
    /* Buttons usually have their own dark theme variants (e.g., .btn-primary). */
    /* If this button needs specific dark theme styling different from global button rules: */
    /* Example: */
    /* background-color: var(--primary-color-dark-theme, #YOUR_DARK_PRIMARY_COLOR); */
    /* color: #ffffff; */
    /* border-color: var(--primary-color-dark-theme, #YOUR_DARK_PRIMARY_COLOR); */
/* } */

.dark-theme .suggestions-display-container {
    background-color: #2d3748; /* Darker background for the container */
    border-color: #4a5568; /* Darker border for the container */
    color: #cbd5e1; /* Default light text color for content within the container */
}

/* .dark-theme .suggestions-list { */
    /* Typically, no specific color styling needed here if list items handle it. */
/* } */

/* Increased specificity for suggestion items in dark mode for better override capability */
.dark-theme .suggestions-display-container .suggestions-list .suggestion-item {
    border-bottom-color: #4a5568; /* Darker separator line between items */
    color: #e2e8f0; /* Light text color for suggestion items */
}

.dark-theme .suggestions-display-container .suggestions-list .suggestion-item:hover {
    background-color: #374151; /* Slightly lighter background on hover */
    color: #ffffff; /* Ensure text remains bright white on hover for clarity */
}

.dark-theme .suggestions-display-container .loading-state,
.dark-theme .suggestions-display-container .error-state,
.dark-theme .suggestions-display-container .empty-state {
    color: #94a3b8; /* Lighter text color for status messages */
}

/* ... existing styles ... */
