/* ===== FIELDSET CONTAINER ===== */
.webform-submission-form .webform-type-fieldset {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  background-color: #ffffff;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
}

/* subtle hover */
.webform-submission-form .webform-type-fieldset:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ===== LEGEND ===== */
.webform-submission-form .webform-type-fieldset > legend {
  margin-bottom: 0.75rem;
}

/* ===== HEADER (SAFE FULL-WIDTH STYLE) ===== */
.webform-submission-form .webform-type-fieldset > legend span {
  display: block;

  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #1f2937;

  background-color: #f9fafb;

  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 6px;

  margin-left: -1.25rem;
  margin-right: -1.25rem;

  border: 1px solid #e5e7eb;
  border-left: 4px solid #2f80ed;

  box-shadow: 0 1px 2px rgba(0,0,0,0.04);

  margin-bottom: 1rem;

  position: relative;
}

/* ===== ICONS (SAFE — NO DUPLICATES) ===== */
.webform-submission-form .webform-type-fieldset.section-general-information > legend > span::before {
  content: "ℹ️";
}

.webform-submission-form .webform-type-fieldset.section-applicant > legend > span::before {
  content: "👤";
}
.webform-submission-form .webform-type-fieldset.section-household > legend > span::before {
  content: "🏠";
}
.webform-submission-form .webform-type-fieldset.section-location > legend > span::before {
  content: "📍";
}
.webform-submission-form .webform-type-fieldset.section-displacement > legend > span::before {
  content: "🏘️";
}
.webform-submission-form .webform-type-fieldset.section-transfer > legend > span::before {
  content: "💳";
}
.webform-submission-form .webform-type-fieldset.section-consent > legend > span::before {
  content: "✔️";
}
.webform-submission-form .webform-type-fieldset.section-rapid-response > legend > span::before {
  content: "🚨";
}

/* icon positioning */
.webform-submission-form .webform-type-fieldset > legend span::before {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.75;
}

/* ===== CONTENT ===== */
.webform-submission-form .webform-type-fieldset > .fieldset-wrapper {
  padding-top: 0.5rem;
}

/* ===== DESCRIPTION ===== */
.webform-submission-form .fieldset-wrapper > .description {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ===== FIELD SPACING ===== */
.webform-submission-form .form-item {
  margin-bottom: 1.25rem;
}

/* ===== LABELS ===== */
.webform-submission-form label {
  font-weight: 600;
  color: #111827;
  display: block;
  margin-bottom: 0.25rem;
}

/* ===== INPUTS ===== */
.webform-submission-form input,
.webform-submission-form select,
.webform-submission-form textarea {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.5rem;
}

/* ===== FOCUS ===== */
.webform-submission-form input:focus,
.webform-submission-form select:focus,
.webform-submission-form textarea:focus {
  outline: none;
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.15);
}

/* ===== BENEFIT OUTPUT ===== */
.benefit-output {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #f9fafb;
  margin-bottom: 0.4rem;
}

/* ===== ERC SHADED COLOR SYSTEM ===== */

/* General Information (attention / introduction) */
.webform-submission-form .webform-type-fieldset.section-general-information > legend span {
  background-color: #FFF8E6;
  border-left: 6px solid #D4A017;
  border-right: 6px solid #D4A017;
  border-top: 2px solid #D4A017;
  border-bottom: 2px solid #D4A017;
}

/* Applicant (base blue) */
.webform-submission-form .webform-type-fieldset.section-applicant > legend span {
  border-left: 6px solid #7F8CAB;
  border-right: 6px solid #7F8CAB;
  border-top: 2px solid #7F8CAB;
  border-bottom: 2px solid #7F8CAB;
}

/* Location (lighter blue) */
.webform-submission-form .webform-type-fieldset.section-location > legend span {
  border-left: 6px solid #9FABC9;
  border-right: 6px solid #9FABC9;
  border-top: 2px solid #9FABC9;
  border-bottom: 2px solid #9FABC9;
}

/* Transfer (strong blue) */
.webform-submission-form .webform-type-fieldset.section-transfer > legend span {
  border-left: 6px solid #5F6F94;
  border-right: 6px solid #5F6F94;
  border-top: 2px solid #5F6F94;
  border-bottom: 2px solid #5F6F94;
}

/* Household (blue toned toward green system color for separation but still subtle) */
.webform-submission-form .webform-type-fieldset.section-household > legend span {
  border-left: 6px solid #A1BAC7;
  border-right: 6px solid #A1BAC7;
  border-top: 2px solid #A1BAC7;
  border-bottom: 2px solid #A1BAC7;
}

/* Members (very light blue-grey) */
.webform-submission-form .webform-type-fieldset.section-members > legend span {
  border-left: 6px solid #C1D0D8;
 border-right: 6px solid #C1D0D8;
  border-top: 2px solid #C1D0D8;
  border-bottom: 2px solid #C1D0D8;
}

/* Rapid Response (strong red) */
.webform-submission-form .webform-type-fieldset.section-rapid-response > legend span {
  border-left: 6px solid #F0003C;
  border-right: 6px solid #F0003C;
  border-top: 2px solid #F0003C;
  border-bottom: 2px solid #F0003C;
}

/* Displacement (softer red) */
.webform-submission-form .webform-type-fieldset.section-displacement > legend span {
  border-left: 6px solid #E35176;
 border-right: 6px solid #E35176;
  border-top: 2px solid #E35176;
  border-bottom: 2px solid #E35176;
}

/* Confirmation (neutral grey for final step) */
.webform-submission-form .webform-type-fieldset.section-consent > legend span {
  border-left: 6px solid #70676A;
  border-right: 6px solid #70676A;
  border-top: 2px solid #70676A;
  border-bottom: 2px solid #70676A;
}

.webform-submission-form .webform-type-fieldset > legend span {
  border-radius: 6px;
}

/* Hide title ONLY for status messages */
.messages--status h2,
.messages--status .messages__title,
.messages--status .alert-heading {
  display: none !important;
}

/* Hide icons ONLY for status messages */
.messages--status::before,
.messages--status::after,
.messages--status *::before,
.messages--status *::after {
  content: none !important;
  display: none !important;
}

.messages--status .messages__icon,
.messages--status .icon,
.messages--status svg,
.messages--status i {
  display: none !important;
}

.webform-multiple-table table tbody tr:nth-child(4n+1) td:first-child {
  border-left: 10px solid #7ea6d8 !important; /* Blue */
}

.webform-multiple-table table tbody tr:nth-child(4n+2) td:first-child {
  border-left: 10px solid #c9b458 !important; /* Gold */
}

.webform-multiple-table table tbody tr:nth-child(4n+3) td:first-child {
  border-left: 10px solid #9b8ac7 !important; /* Lavender */
}

.webform-multiple-table table tbody tr:nth-child(4n+4) td:first-child {
  border-left: 10px solid #c29a73 !important; /* Warm beige */
}

/* =====================================================
   GEOLOCATION REMINDER
===================================================== */

.geo-reminder {

  position: fixed;

  top: 80px;
  right: 20px;

  width: 360px;
  max-width: calc(100vw - 40px);

  padding: 16px 20px;

  background: #eff6ff;
  border-left: 5px solid #2563eb;
  border-radius: 8px;

  color: #1e3a8a;
  font-size: 15px;
  line-height: 1.5;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

  z-index: 9999;
}

.geo-reminder strong {
  font-weight: 700;
}

/* Mobile */
@media (max-width: 768px) {

  .geo-reminder {

    left: 10px;
    right: 10px;
    top: 70px;

    width: auto;
    max-width: none;

    font-size: 14px;

  }

}

/* ==========================================
   Household Members - Mobile
========================================== */
@media (max-width: 768px) {

  table[data-drupal-selector="edit-household-members-items"] {
    display: block;
    width: 100%;
  }

  table[data-drupal-selector="edit-household-members-items"] tbody,
  table[data-drupal-selector="edit-household-members-items"] tr,
  table[data-drupal-selector="edit-household-members-items"] td {
    display: block;
    width: 100%;
  }

  table[data-drupal-selector="edit-household-members-items"] td {
    box-sizing: border-box;
    padding: 12px !important;
  }

  table[data-drupal-selector="edit-household-members-items"] input,
  table[data-drupal-selector="edit-household-members-items"] select,
  table[data-drupal-selector="edit-household-members-items"] textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  table[data-drupal-selector="edit-household-members-items"] label {
    white-space: normal;
    word-break: break-word;
  }

  table[data-drupal-selector="edit-household-members-items"] .webform-multiple-table--operations {
    text-align: right;
    padding-top: 15px;
  }

}

/* Force all fields to fit the screen */
@media (max-width:768px){

  table[data-drupal-selector="edit-household-members-items"] input[type="text"],
  table[data-drupal-selector="edit-household-members-items"] input[type="number"],
  table[data-drupal-selector="edit-household-members-items"] input[type="date"],
  table[data-drupal-selector="edit-household-members-items"] input[type="file"],
  table[data-drupal-selector="edit-household-members-items"] select {

    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

}