/* ------------------------------
   Main Brand Header
------------------------------ */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #eee;
}

.es-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.3;
}

.es-initials {
  font-size: 32px;
  font-weight: bold;
  color: #000;
  letter-spacing: 2px;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 4px;
}

.es-subtext {
  font-size: 0.7rem;
  color: #aaa;
  letter-spacing: 1px;
  font-family: Helvetica, Arial, sans-serif;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-text {
  margin-right: 15px;
  font-weight: 500;
  color: #333;
}

/* --------------------------------------------------
   Global Page Styles
-------------------------------------------------- */
/* Ensure body takes full height */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  text-align: center;
}

/* Main content area should grow to push footer down */
.main-content {
  flex: 1;
}

.form-card {
  width: 90%;
  max-width: 900px;
  margin: 50px auto;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .form-card {
    width: 95%;
    padding: 20px;
  }
}

.text-left {
    text-align: left;
}

/* --------------------------------------------------
   Typography
-------------------------------------------------- */
h1 {
  color: #003366;
  margin-bottom: 20px;
}

label {
  display: block;
  margin: 15px 0 5px;
  font-weight: normal;
  color: #333;
}

/* --------------------------------------------------
   Inputs
-------------------------------------------------- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
textarea,
select {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin: 10px 0;
}

/* --------------------------------------------------
   Default Form Layout (45/55)
-------------------------------------------------- */
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  text-align: left;
}

.form-group > label {
  flex: 0 0 45%;
  padding-right: 20px; /* spacing between the two columns */
  margin: 0;
  font-weight: normal;
  color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
  flex: 1;
  max-width: none;
}

/* --------------------------------------------------
   Radio Groups (Unified)
-------------------------------------------------- */
.inline-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.inline-radio input[type="radio"] {
  margin: 0;
  position: relative;
  top: 1px;
}

/* --------------------------------------------------
   Wide Questions Layout (75/25)
-------------------------------------------------- */

.wide-questions .form-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 20px;
  text-align: left;
}

/* 75% question column */
.wide-questions .form-group > label {
  flex: 0 0 75%;
  max-width: 75%;
  margin: 0;
  padding-right: 20px;
  font-weight: normal;
  color: #444;
}

/* 25% answer column */
.wide-questions .answers {
  flex: 0 0 25%;
  max-width: 25%;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

/* --------------------------------------------------
   Buttons
-------------------------------------------------- */
.btn-outline {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  background: transparent;
  border: 2px solid;
  transition: color 0.2s ease;
}

.btn-outline-primary {
  border-color: darkgray;
  color: #007bff;
}

.btn-outline-primary:hover {
  color: #0056b3;
}

.btn-outline-secondary {
  border-color: darkgray;
  color: #007bff;
}

.btn-outline-secondary:hover {
  color: #222;
}

/* --------------------------------------------------
   Form Actions
-------------------------------------------------- */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

/*---------------------------------------------------
  Information Icon
---------------------------------------------------*/

/* Info icon styled as a circle with italic "i" */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid #555;   /* dark grey outline */
  border-radius: 50%;         /* circle */
  font-size: 0.75rem;
  font-style: italic;
  color: #555;                /* dark grey text */
  background: transparent;    /* no fill */
  cursor: pointer;
  position: relative;
  margin-left: -2px;          /* move left (or use 0px, 1px, etc.) */
  top: -0.2rem;               /* moves it upward */
  vertical-align: super;      /* superscript position */
}

/* Tooltip styling */
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: normal;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.info-icon:hover::after {
  opacity: 1;
}
/* Disable tooltip entirely when no data-tooltip attribute is present */
.info-icon:not([data-tooltip])::after {
  content: none !important;
  display: none !important;
}


/*---------------------------------------------------
  Bottom sheet info panel
---------------------------------------------------*/

.info-sheet {
  position: fixed;
  inset: 0;               /* top:0; right:0; bottom:0; left:0 */
  display: none;          /* hidden by default */
  z-index: 9999;          /* above everything in the wizard */
}

.info-sheet.open {
  display: block;
}

/* Semi-transparent dark background behind the sheet */
.info-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

/* Sliding panel from bottom */
.info-sheet-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -100%;          /* start off-screen */
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  padding: 1.5rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  transition: bottom 0.3s ease-out;
}

/* When the sheet is open, slide it up into view */
.info-sheet.open .info-sheet-content {
  bottom: 0;
}

/* Close button inside the sheet */
.info-sheet-close {
  border: none;
  background: none;
  font-size: 1.2rem;
  font-weight: 600;
  float: right;
  cursor: pointer;
}

.info-sheet h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}


/* ------------------------------
   Unified Card Style
------------------------------ */
.unified-card {
  flex: 1;
  min-width: 220px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.unified-card:hover {
  transform: translateY(-3px);
}

.unified-card h3 {
  font-size: 1rem;
  color: #333;
  margin-bottom: 8px;
}

.unified-card p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 16px;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
  /* Process flow stacks vertically */
  .process-flow {
    flex-direction: column;
    gap: 16px;
  }

  .flow-step {
    min-width: 100%;
    text-align: left;   /* left-align text for mobile readability */
  }

  .step-number {
    margin: 0 0 8px 0;  /* align number above text */
  }

  /* Card grid stacks vertically */
  .card-grid {
    flex-direction: column;
    gap: 20px;
  }

  .unified-card {
    min-width: 100%;
    text-align: left;
  }

  /* Intro paragraph */
  .landing-container .intro {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666; /* soft gray */
    text-align: left;
    margin-bottom: 20px;
  }

  /* Buttons expand slightly for touch targets */
  .btn-outline {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

}

/* ------------------------------
   Vetting Questions Styling
------------------------------ */

.vetting-form-group {
  display: grid;
  grid-template-columns: 75% 25%;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem; }

.vetting-answers {
  flex: 0 0 25%;
  max-width: 25%;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

/* Larger, consistent question text across all wizard steps */
.vetting-question {
    font-size: 1.3rem;     /* adjust to taste */
    font-weight: 400;       /* optional: makes it feel more like a question */
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;            /* spacing between text and the (i) icon */
}

.vetting-inline-radio {
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.vetting-inline-radio input[type="radio"] {
  margin: 0;
  position: relative;
  width: 1.3rem;
  height: 1.3rem;
  top: 1px;
}

.hidden-file-input {
  position: absolute;
  left: -9999px;
}

.delete-form {
  display: inline;
}

.file-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
}

.file-icon.pdf { background-image: url('/static/icons/pdf.png'); }
.file-icon.jpg,
.file-icon.jpeg,
.file-icon.png { background-image: url('/static/icons/image.png'); }
.file-icon.doc,
.file-icon.docx { background-image: url('/static/icons/word.png'); }
.file-icon.generic { background-image: url('/static/icons/file.png'); }

.delete-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}


.delete-btn:hover .trash-icon {
  color: #c00; /* red on hover */
}

.file-name {
  background: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
  color: #666; /* soft gray */
  padding: 0 !important;
  margin: 0;
}

/* Ensure icons and trash buttons stay aligned */
.file-icon {
  width: 22px;
  height: 22px;
}

/* 3-column layout: label | dropzone | file list */
.form-group-upload {
  display: grid;
  grid-template-columns: 45% 160px 1fr; /* label | dropzone | files */
  align-items: start;
  gap: 20px;
}

/* Small square dropzone */
.dropzone {
  width: 80px;
  height: 80px;
  border: 2px dashed #999;
  border-radius: 6px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  padding: 10px;
}

.dropzone.dragover {
  background: #eef;
  border-color: #66f;
}

/* File list column */
.uploaded-list,
.pending-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Each file row: icon | filename | trash */
.uploaded-file {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Filename styling */
.uploaded-file .file-name {
  font-size: 14px;
  font-family: inherit;
  color: #333;
  word-break: break-word;
}

.hidden-file-input {
  position: absolute;
  left: -9999px;
}

.dropzone {
  border: 2px dashed #999;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #fafafa;
}
.dropzone.dragover {
  background: #eef;
  border-color: #66f;
}

.pending-file-list {
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
}
.pending-file-list li {
  background: #eef2ff;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 14px;
}

.uploaded-list {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.uploaded-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.file-icon {
  width: 22px;
  height: 22px;
  color: #555;
  flex-shrink: 0;
}


.trash-icon {
  width: 18px;
  height: 18px;
  color: #666;
  transition: color 0.2s ease;
}

.delete-btn:hover .trash-icon {
  color: #c00;
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: #dc3545;
}

.error-banner {
  background-color: #fee2e2;
  border: 1px solid #dc2626;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
  color: #dc2626;
  list-style: none;
}

.error-banner div {
  margin: 5px 0;
}

/* --------------------------------------------------
   Footer Styles
-------------------------------------------------- */
.main-footer {
  background: #eee;
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.footer-links a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.3s ease;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.footer-links a:hover {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.1);
}

.footer-separator {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

@media (max-width: 768px) {
  .main-footer {
    padding: 15px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }

  .footer-separator {
    display: none;
  }
}

/* --------------------------------------------------
   Footer Modal Styles
-------------------------------------------------- */
.footer-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.footer-modal-content {
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s ease;
}

.footer-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s;
}

.footer-modal-close:hover {
  color: #000;
}

.footer-modal-content h2 {
  margin-top: 0;
  color: #333;
  font-size: 28px;
  margin-bottom: 20px;
}

.footer-modal-content p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 15px;
}

/* --------------------------------------------------
   Ask Attorney Button & Modal Styles
-------------------------------------------------- */
.btn-ask-attorney {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0 15px;
}

.btn-ask-attorney:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-ask-attorney svg {
  width: 20px;
  height: 20px;
}

/* Attorney Modal Styles */
.attorney-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.attorney-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.attorney-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s;
}

.attorney-close:hover {
  color: #000;
}

.attorney-modal-content h2 {
  margin-top: 0;
  color: #333;
  font-size: 24px;
}

.attorney-modal-content p {
  color: #666;
  margin-bottom: 20px;
}

#attorney-question-form .form-group {
  margin-bottom: 20px;
}

#attorney-question-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

#attorney-question-form input,
#attorney-question-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

#attorney-question-form textarea {
  resize: vertical;
}

#attorney-question-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}