:root {
--primary-color: #28a745;
--border-color: #dee2e6;
--text-color: #343a40;
--bg-color: #f8f9fa;
--container-bg: #ffffff;
--error-color: #dc3545;
}
body {
font-family: "supria-sans", sans-serif;
background: linear-gradient(120deg, #e6f9f0, #d4f4e2);
margin: 0;
color: var(--text-color);
}
body.modal-open {
    overflow: hidden;
}
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 30px;
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#form-logo-container {
  margin-bottom: 30px;
}
#form-logo-container img {
  max-width: 80px;
  height: auto;
  display: block;
}
.main-content-wrapper {
  display: flex;
  width: 100%;
  margin: 0 auto;
  gap: 40px;
}
#form-nav-sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: var(--container-bg);
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  align-self: flex-start;
  position: sticky;
  top: 30px;
}
#form-nav-sidebar h4 {
  margin: 0 0 20px 0;
  font-size: 1.1em;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}
#form-nav-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#form-nav-sidebar li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 6px;
  margin-bottom: 5px;
  transition: background-color 0.2s;
  font-weight: 500;
}
#form-nav-sidebar li a:hover {
  background-color: var(--bg-color);
}
#form-nav-sidebar li a.active {
  background-color: #e6f9f0;
  color: var(--primary-color);
  font-weight: 700;
}
#form-nav-sidebar li a .nav-status-icon {
  margin-right: 12px;
  font-size: 1.2em;
  color: #adb5bd;
}
#form-nav-sidebar li a.completed .nav-status-icon {
  color: var(--primary-color);
}
.form-container {
  background-color: var(--container-bg);
  padding: 40px 60px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
  flex-grow: 1;
}
.form-container.submitted {
    margin: 0 auto;
}
#mobile-nav-header {
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  display: none;
}
#mobile-nav-header .mobile-nav-display {
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#mobile-nav-header .mobile-nav-display::after {
  content: '▼';
  font-size: 0.8em;
  transition: transform 0.3s;
}
#mobile-nav-header.active .mobile-nav-display::after {
  transform: rotate(180deg);
}
#mobile-nav-header ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
}
#mobile-nav-header.active ul {
  max-height: 50vh;
  overflow-y: auto;
  padding: 0 10px 10px 10px;
  border-top: 1px solid var(--border-color);
}
#mobile-nav-header li a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: var(--text-color);
  border-radius: 4px;
}
#mobile-nav-header li a.active {
  background-color: #e6f9f0;
  font-weight: bold;
}
#mobile-nav-header li a .nav-status-icon {
  margin-right: 8px;
}
#mobile-nav-header li a.completed .nav-status-icon {
  color: var(--primary-color);
}
#progress-indicator {
margin-bottom: 30px;
}
#step-counter {
font-size: 0.9em;
color: #6c757d;
text-align: left;
display: block;
margin-bottom: 8px;
}
.progress-bar-container {
width: 100%;
height: 8px;
background-color: var(--bg-color);
border-radius: 4px;
overflow: hidden;
}
.progress-bar {
height: 100%;
width: 0%;
background-color: var(--primary-color);
transition: width 0.3s ease-in-out;
}
#form-step-container {
min-height: 250px;
}
.form-step {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
h2 {
font-size: 1.5em;
font-weight: 700;
margin: 0;
}
h3 {
font-size: 1.2em;
font-weight: 400;
margin-top: 0;
margin-bottom: 15px;
}
.required-indicator {
    color: var(--error-color);
    font-weight: bold;
    margin-left: 4px;
}
.optional-indicator {
    color: #6c757d;
    font-size: 0.85em;
    font-weight: 400;
    margin-left: 4px;
}
.helper-text {
font-size: 0.9em;
color: #6c757d;
margin-bottom: 20px;
white-space: pre-wrap;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 6px;
font-size: 1em;
box-sizing: border-box;
transition: border-color 0.2s;
font-family: "supria-sans", sans-serif;
}
.currency-input-wrapper input {
padding-left: 24px;
}
.currency-input-wrapper {
position: relative;
}
.currency-input-wrapper::before {
content: '$';
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
pointer-events: none;
}
input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}
textarea {
min-height: 120px;
resize: vertical;
}
.radio-group label {
display: block;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 6px;
margin-bottom: 10px;
cursor: pointer;
transition: all 0.2s;
}
.radio-group input[type="radio"] {
display: none;
}
.radio-group input[type="radio"]:checked + span {
font-weight: bold;
}
.radio-group input[type="radio"]:checked + span::before {
content: '✓';
color: var(--primary-color);
margin-right: 8px;
font-weight: bold;
}
.radio-group label:hover {
border-color: var(--primary-color);
}
.radio-group label.selected {
border: 2px solid var(--primary-color);
background-color: #f0fff4;
padding: 11px;
}
.checklist-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
}
.checklist-group.error {
    border-color: var(--error-color);
}
.checklist-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}
.checklist-item:last-child {
    border-bottom: none;
}
.checklist-label {
    margin: 0 0 10px 0;
    font-weight: 500;
}
.checklist-radio-group {
    display: flex;
    gap: 15px;
}
.checklist-radio-group label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-grow: 1;
    justify-content: center;
}
.checklist-radio-group input[type="radio"] {
    display: none;
}
.checklist-radio-group label:hover {
    border-color: var(--primary-color);
}
.checklist-radio-group label.selected {
    border: 2px solid var(--primary-color);
    background-color: #f0fff4;
    font-weight: bold;
    padding: 7px 15px;
}
.final-step-checkbox {
    margin-top: 25px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
}
.final-step-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.final-step-checkbox label {
    font-size: 0.95em;
    line-height: 1.5;
}
.final-step-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.final-step-checkbox a:hover {
    text-decoration: underline;
}
.navigation-buttons {
display: flex;
justify-content: flex-end;
margin-top: 40px;
border-top: 1px solid #f0f0f0;
padding-top: 30px;
}
button {
border: none;
background: none;
font-family: "supria-sans", sans-serif;
}
.primary-btn {
background-color: var(--primary-color);
color: white;
padding: 12px 24px;
border: none;
border-radius: 6px;
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.2s;
text-decoration: none;
display: inline-block;
}
.primary-btn:hover:not(:disabled) {
background-color: #218838;
}
.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.secondary-btn {
background-color: transparent;
color: var(--text-color);
border: 1px solid var(--border-color);
margin-right: auto;
padding: 12px 24px;
border-radius: 6px;
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.2s;
}
.secondary-btn:hover {
background-color: var(--bg-color);
}
.tertiary-btn {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}
.tertiary-btn:hover {
    background-color: #f8f9fa;
}
.ai-enhance-btn {
    background-color: #e6f9f0;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 6px 12px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-enhance-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
.hidden {
display: none !important;
}
.submission-thank-you .primary-btn {
    margin-top: 20px;
}
.file-upload-label {
border: 2px dashed var(--border-color);
border-radius: 6px;
padding: 30px;
text-align: center;
cursor: pointer;
display: block;
margin-top: 15px;
transition: all 0.2s ease-in-out;
}
.file-upload-label:hover, .file-upload-label.drag-over {
border-color: var(--primary-color);
background-color: #e6f9f0;
}
#file-feedback {
margin-top: 10px;
font-weight: bold;
}
.skip-upload-container {
    margin-top: 15px;
    display: flex;
    align-items: center;
}
.skip-upload-container input[type="checkbox"] {
    margin-right: 8px;
    width: auto; /* override default input width */
}
.skip-upload-container label {
    font-size: 0.9em;
    color: #6c757d;
}
.grid-table {
width: 100%;
border-collapse: collapse;
}
.grid-table th, .grid-table td {
padding: 8px;
text-align: left;
border: 1px solid var(--border-color);
}
.grid-table th {
background-color: #f8f9fa;
}
.grid-table input {
width: 100%;
border: none;
padding: 4px;
}
.error-message {
color: var(--error-color);
font-size: 0.8em;
margin-top: 5px;
display: block;
}
input.error, select.error, textarea.error, div.error {
border-color: var(--error-color) !important;
}
.radio-group.error {
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 5px;
}

/* --- AI MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 60px);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { margin: 0; font-size: 1.2rem; }
.modal-close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #6c757d; }
.modal-body {
    padding: 20px;
    overflow-y: auto;
}
.modal-field { margin-bottom: 20px; }
.modal-field label { font-weight: bold; display: block; margin-bottom: 5px; }
.modal-helper-text { font-size: 0.85em; color: #6c757d; margin-top: 0; margin-bottom: 8px; }
.modal-field textarea { width: 100%; min-height: 100px; }
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
}
.powered-by { font-size: 0.8em; color: #6c757d; }
.powered-by a { color: var(--primary-color); text-decoration: none; }
.powered-by a:hover { text-decoration: underline; }

/* Loader for AI Modal */
.loader-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.loader {
    border: 5px solid var(--bg-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


@media (max-width: 992px) {
    html, body {
      height: 100dvh;
      overflow: hidden;
    }
    .page-wrapper {
      padding: 0;
      height: 100dvh;
      justify-content: flex-start;
      min-height: initial;
    }
    #form-nav-sidebar {
      display: none;
    }
    #mobile-nav-header {
      display: block;
    }
    .main-content-wrapper {
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        max-width: none;
    }
    #form-logo-container {
        position: static;
        padding: 20px 20px 0 20px;
        flex-shrink: 0;
        background-color: var(--container-bg);
        margin-bottom: 0;
    }
    .form-container {
        height: 1px;
        flex-grow: 1;
        max-width: none;
        box-shadow: none;
        border-radius: 0;
        overflow-y: auto;
        padding: 20px 20px 120px 20px;
    }
    #form-step-container {
        min-height: initial;
    }
    input[type="date"] {
        min-width: 0;
        max-width: 100%;
    }
    .navigation-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--container-bg);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
        box-sizing: border-box;
        margin-top: 0;
        padding: 20px;
        border-top: 1px solid var(--border-color);
    }
}
