/* =========================================================
   PATIENT INTAKE FORM STYLING (#01788C BRAND)
   ========================================================= */

/* Main Container */
.custom-form {
  max-width: 920px;
  margin: 40px auto;
  padding: 0 15px;
}

.custom-form .ry-form.ry-container {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 0;
  overflow: hidden;
}

/* Header Section */
.custom-form .form-heading {
  background: #01788C;
  color: #ffffff;
  padding: 28px 24px;
  text-align: center;
  border-bottom: 3px solid #015c6b;
}

.custom-form .form-heading h1 {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.custom-form .form-heading p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* Form Body & Fieldset */
.custom-form .fieldset {
  padding: 32px 28px;
}

.custom-form .form-item {
  margin-bottom: 28px;
}

/* Main Section Titles (1. Patient Info, 2. Insurance, 3. Medical History) */
.custom-form .form-item h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #01788C;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
  display: block;
  width: 100%;
}

/* Sub-Headings with Separator Border (Primary Insurance, Secondary Insurance) */
.custom-form .form-item h3 {
  font-size: 0.925rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 6px;
  margin-top: 22px;
  margin-bottom: 16px;
  display: block;
  width: 100%;
}

/* 2-Column Grid Layout */
.custom-form .ry-form-inner.two-column {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
}

.custom-form .ry-form-inner.two-column .h-block {
  width: 50% !important;
  float: left !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}

/* Form Item Rows & Full-Width Inputs */
.custom-form .items {
  margin-bottom: 18px !important;
  padding: 0 !important;
  width: 100% !important;
}

.custom-form .items > div:first-child {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}

.custom-form .span-1 {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.custom-form .form-group {
  width: 100% !important;
  margin-bottom: 0 !important;
}

/* Full Width Form Controls */
.custom-form .form-control {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: #1e293b;
  background-color: #ffffff;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-form .form-control:focus {
  border-color: #01788C;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(1, 120, 140, 0.18);
  background-color: #ffffff;
}

.custom-form .form-control::placeholder {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Submit Button */
.custom-form .form-group[data-type="submit"] {
  text-align: center;
  margin-top: 30px !important;
  margin-bottom: 10px !important;
  width: 100% !important;
}

.custom-form button[type="submit"] {
  background: #01788C;
  border: none;
  border-radius: 6px;
  padding: 14px 44px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(1, 120, 140, 0.25);
  transition: all 0.2s ease;
}

.custom-form button[type="submit"]:hover {
  background: #015c6b;
  box-shadow: 0 4px 14px rgba(1, 120, 140, 0.35);
  transform: translateY(-1px);
}

.custom-form .ry-btn-sumbit span {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Responsive Mobile View */
@media (max-width: 768px) {
  .custom-form {
    padding: 0 10px;
    margin: 20px auto;
  }
  .custom-form .fieldset {
    padding: 20px 15px;
  }
  .custom-form .form-heading {
    padding: 20px 15px;
  }
  .custom-form .form-heading h1 {
    font-size: 1.35rem;
  }
  .custom-form .ry-form-inner.two-column .h-block {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Hide Header & Footer on this page */
body[data-page-name="new-patient-registration-form"] .sticky-icons,
body[data-page-name="new-patient-registration-form"] .sticky.top-0,
body[data-page-name="new-patient-registration-form"] #navigation,
body[data-page-name="new-patient-registration-form"] .snap-mobile-menu,
body[data-page-name="new-patient-registration-form"] #ry-footer-3 {
  display: none !important;
}


/* Checkbox Grid & Item Styling */
.custom-checkbox-grid {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 8px 0 20px 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
}

/* Force Left and Right columns to 50% each */
.custom-checkbox-grid > div {
  width: 50% !important;
  box-sizing: border-box !important;
  padding-right: 15px;
}

.custom-checkbox-grid .form-check {
  margin-bottom: 12px;
}

.custom-checkbox-grid label {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 0 !important;
}

.custom-checkbox-grid input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  cursor: pointer;
  accent-color: #01788C;
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile: Collapse to 1 column on small phones */
@media (max-width: 600px) {
  .custom-checkbox-grid > div {
    width: 100% !important;
    padding-right: 0;
  }
}