/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background-color: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
}

h1 {
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
}

h2 {
    color: #2563eb;
    margin: 20px 0;
}

h3 {
    color: #1a1a1a;
    margin: 15px 0;
}

/* Progress Section */
.progress-container {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}

.progress {
    height: 40px;
    background-color: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.6s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 16px;
}

.progress-bar::after {
    content: attr(data-percent);
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#form-count {
    text-align: center;
    margin-top: 12px;
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

/* Form Cards Grid */
.form-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .form-links {
        grid-template-columns: 1fr;
    }
}

.form-button {
    display: block;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.form-button:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.form-button.completed {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-button.disabled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.form-button.disabled .form-icon {
    opacity: 0.4;
}

.form-button.disabled .form-title {
    color: #94a3b8;
}

.form-button.disabled .form-description {
    color: #cbd5e1;
}

.form-button.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
}

.form-button-content {
    display: flex;
    align-items: flex-start;
}

.form-icon {
    font-size: 2.5rem;
    margin-right: 16px;
    line-height: 1;
}

.form-info {
    flex: 1;
}

.form-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.form-description {
    font-size: 0.875rem;
    color: #64748b;
}

.completion-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background-color: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: badgeAppear 0.3s ease-out;
}

@keyframes badgeAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Report Section */
.report-section {
    margin: 40px 0;
}

.report-button {
    display: block;
    width: 100%;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 20px;
}

.report-button:hover:not(:disabled) {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.report-button:disabled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.report-button:disabled .report-icon {
    opacity: 0.4;
}

.report-button:disabled .report-title {
    color: #94a3b8;
}

.report-button:disabled .report-description {
    color: #cbd5e1;
}

.report-button-content {
    display: flex;
    align-items: center;
}

.report-icon {
    font-size: 3rem;
    margin-right: 20px;
    line-height: 1;
}

.report-info {
    flex: 1;
}

.report-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.report-description {
    font-size: 0.875rem;
    color: #64748b;
}

.report-button:not(:disabled) {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-color: #3b82f6;
    position: relative;
    overflow: hidden;
    animation: enablePulse 0.5s ease-out;
}

@keyframes enablePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.report-button:not(:disabled)::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6);
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.report-button:not(:disabled):hover::before {
    opacity: 0.1;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.report-button:not(:disabled) .report-title {
    color: #1e40af;
}

.report-button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.utility-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.utility-button {
    background-color: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.utility-button:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.utility-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Special styling for reset button */
#reset-progress:hover {
    border-color: #f87171;
    color: #dc2626;
    background-color: #fef2f2;
}

.primary-button,
.submit-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.primary-button:hover:not(:disabled),
.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.primary-button:disabled,
.submit-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.submit-button {
    display: block;
    margin: 20px auto;
}



.secondary-button {
    background-color: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.secondary-button:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header h3 {
    color: #1a1a1a;
    font-size: 1.5rem;
    margin: 0 0 16px 0;
}

.modal-body {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Text inputs and textareas */
input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

input[type="text"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
    background-color: white;
    border-color: #cbd5e1;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    background-color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Enhanced checkbox and radio button styling */
.checkbox-group, .radio-group {
    display: block;
    margin-top: 10px;
    padding: 5px 0;
}

/* Hide default inputs */
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Shared label styling */
.checkbox-group label,
.radio-group label {
    display: inline-block;
    position: relative;
    margin-right: 15px;
    margin-bottom: 10px;
    padding: 8px 12px 8px 42px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal;
    line-height: 1.4;
}

/* Custom checkbox/radio appearance */
.checkbox-group label::before,
.radio-group label::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    background-color: white;
    transition: all 0.2s ease;
}

.checkbox-group label::before {
    border-radius: 3px;
}

.radio-group label::before {
    border-radius: 50%;
}

/* Checkbox checkmark */
.checkbox-group label::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.checkbox-group input[type="checkbox"]:checked + label::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Radio dot */
.radio-group label::after {
    content: '';
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.2s ease;
}

.radio-group input[type="radio"]:checked + label::after {
    background-color: white;
}

/* Hover states */
.checkbox-group label:hover,
.radio-group label:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Checked states */
.checkbox-group input[type="checkbox"]:checked + label,
.radio-group input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"]:checked + label::before,
.radio-group input[type="radio"]:checked + label::before {
    background-color: #2196f3;
    border-color: #2196f3;
}

/* For inline text inputs within checkbox/radio groups */
.checkbox-group .other-input,
.radio-group .other-input {
    margin-left: 5px;
    padding: 6px 10px;
    font-size: 14px;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 3px;
    width: auto;
    min-width: 120px;
    vertical-align: middle;
    display: inline-block;
}

/* Special handling for conclusion form question 5 */
#future-services-group label {
    display: block;
    width: fit-content;
}

.other-input {
    width: 200px;
    display: inline-block;
    margin-left: 10px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Flash Messages */
.flash-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.flash-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.flash-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.flash-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Debug Modal Styles */
.debug-content {
    text-align: left;
}

.debug-section {
    margin-bottom: 24px;
}

.debug-section h4 {
    color: #1a1a1a;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.form-status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f8fafc;
}

.form-status-item.status-complete {
    background-color: #f0fdf4;
    color: #166534;
}

.form-status-item.status-incomplete {
    background-color: #fef2f2;
    color: #991b1b;
}

.form-name {
    font-weight: 500;
}

.form-status {
    font-weight: 600;
    font-size: 1.125rem;
}

.debug-warning {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.debug-warning p {
    color: #92400e;
    margin-bottom: 12px;
}

.debug-warning .primary-button {
    padding: 10px 20px;
    font-size: 14px;
}

/* Additional existing styles for forms */
.info-panel {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-list {
    margin-left: 20px;
    margin-top: 10px;
}

.info-list li {
    margin-bottom: 8px;
}

.version-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 40px;
}

/* Summary Page Styles */
.summary-section {
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ai-summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #3498db;
    margin-top: 10px;
    margin-bottom: 20px;
}

.key-recommendations {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.key-recommendations ul {
    margin-left: 20px;
}

.summary-sections {
    margin-top: 30px;
}

/* Accordion Styling */
.accordion-item {
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #f8f9fa;
    border: none;
    text-align: left;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 20px 10px;
        padding: 24px 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .report-icon {
        font-size: 2.5rem;
    }
    
    .utility-buttons {
        flex-wrap: wrap;
    }
    
    .utility-button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .form-icon {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 24px;
        width: 95%;
    }
}