/* Clinic & Hospital Contact Form 1.4 - isolated, Elementor-safe, width-adaptive */
.chcf-wrap,
.chcf-wrap * ,
.chcf-wrap *::before,
.chcf-wrap *::after { box-sizing:border-box; }

.chcf-wrap {
  display:block;
  position:relative;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:0;
  color:var(--chcf-text,#1f2937);
  font-family:inherit;
  line-height:1.4;
  isolation:isolate;
}

.chcf-card {
  display:block;
  width:100%;
  max-width:var(--chcf-width,760px);
  min-width:0;
  margin:0 auto;
  overflow:hidden;
  background:var(--chcf-form-bg,#fff);
  border:1px solid var(--chcf-border,#d1d5db);
  border-radius:var(--chcf-radius,12px);
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.chcf-header {
  display:flex;
  align-items:flex-start;
  gap:14px;
  width:100%;
  min-width:0;
  padding:24px 26px;
  background:linear-gradient(135deg,var(--chcf-accent,#e9f7fb),var(--chcf-form-bg,#fff));
  border-bottom:1px solid var(--chcf-border,#d1d5db);
}

.chcf-header > div:last-child { min-width:0; flex:1 1 auto; }
.chcf-header h2 {
  margin:0 0 5px;
  padding:0;
  color:var(--chcf-text,#1f2937);
  font-size:28px;
  line-height:1.18;
  font-weight:700;
  overflow-wrap:anywhere;
}
.chcf-header p {
  margin:0;
  padding:0;
  color:var(--chcf-label,#374151);
  font-size:15px;
  line-height:1.55;
  overflow-wrap:anywhere;
}

.chcf-icon {
  flex:0 0 var(--chcf-icon-size,44px);
  width:var(--chcf-icon-size,44px);
  height:var(--chcf-icon-size,44px);
  display:grid;
  place-items:center;
  border-radius:10px;
  background:var(--chcf-primary,#1f6f8b);
  color:var(--chcf-button-text,#fff);
  overflow:hidden;
}
.chcf-icon-glyph { display:block; font-size:calc(var(--chcf-icon-size,44px)*.55); line-height:1; }
.chcf-custom-icon { display:block; width:72%; height:72%; margin:auto; object-fit:contain; }

.chcf-form {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:26px;
}

.chcf-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 18px;
  width:100%;
  min-width:0;
}

.chcf-field { display:block; width:100%; min-width:0; margin:0 0 17px; }
.chcf-full { grid-column:1 / -1; }
.chcf-field label {
  display:block;
  width:100%;
  margin:0 0 7px;
  padding:0;
  color:var(--chcf-label,#374151);
  font-size:14px;
  line-height:1.35;
  font-weight:600;
  overflow-wrap:anywhere;
}
.chcf-required { color:var(--chcf-primary,#1f6f8b); }

.chcf-field input,
.chcf-field select,
.chcf-field textarea {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  box-sizing:border-box;
  appearance:auto;
  background:var(--chcf-input-bg,#fff);
  border:1px solid var(--chcf-border,#d1d5db);
  border-radius:8px;
  color:var(--chcf-text,#1f2937);
  font-family:inherit;
  font-size:15px;
  line-height:1.35;
  outline:none;
}
.chcf-field input,
.chcf-field select { height:46px; min-height:46px; padding:0 12px; }
.chcf-field textarea { min-height:110px; padding:11px 12px; resize:vertical; }
.chcf-field input:focus,
.chcf-field select:focus,
.chcf-field textarea:focus {
  border-color:var(--chcf-primary,#1f6f8b);
  box-shadow:0 0 0 3px rgba(31,111,139,.12);
}

.chcf-submit {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:48px;
  margin:0;
  padding:12px 18px;
  border:0;
  border-radius:8px;
  background:var(--chcf-primary,#1f6f8b);
  color:var(--chcf-button-text,#fff);
  font-family:inherit;
  font-size:15px;
  line-height:1.2;
  font-weight:700;
  cursor:pointer;
  white-space:normal;
  overflow-wrap:anywhere;
}
.chcf-submit:hover { opacity:.92; }
.chcf-submit:disabled { opacity:.65; cursor:not-allowed; }

.chcf-status { display:none; width:100%; margin:0 0 15px; padding:11px 13px; border-radius:8px; font-size:14px; line-height:1.45; }
.chcf-status.chcf-success { display:block; background:#ecfdf3; color:#166534; border:1px solid #bbf7d0; }
.chcf-status.chcf-error { display:block; background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.chcf-privacy { margin:10px 0 0; padding:0; text-align:center; color:#6b7280; font-size:11px; line-height:1.4; }
.chcf-hp { position:absolute!important; left:-99999px!important; width:1px!important; height:1px!important; overflow:hidden!important; }
.chcf-spinner { display:none; width:16px; height:16px; margin-left:8px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; vertical-align:-3px; animation:chcfspin .7s linear infinite; }
.chcf-loading .chcf-spinner { display:inline-block; }
@keyframes chcfspin { to { transform:rotate(360deg); } }

/* Width classes are applied by ResizeObserver to the actual Elementor container. */
.chcf-wrap.chcf-size-medium .chcf-grid,
.chcf-wrap.chcf-size-narrow .chcf-grid { grid-template-columns:1fr; gap:0; }
.chcf-wrap.chcf-size-medium .chcf-full,
.chcf-wrap.chcf-size-narrow .chcf-full { grid-column:auto; }

.chcf-wrap.chcf-size-medium .chcf-header { padding:20px; }
.chcf-wrap.chcf-size-medium .chcf-form { padding:20px; }
.chcf-wrap.chcf-size-medium .chcf-header h2 { font-size:23px; }
.chcf-wrap.chcf-size-medium .chcf-header p { font-size:14px; }

.chcf-wrap.chcf-size-narrow .chcf-card { border-radius:8px; box-shadow:none; }
.chcf-wrap.chcf-size-narrow .chcf-header { padding:16px; gap:10px; }
.chcf-wrap.chcf-size-narrow .chcf-form { padding:16px; }
.chcf-wrap.chcf-size-narrow .chcf-header h2 { font-size:20px; }
.chcf-wrap.chcf-size-narrow .chcf-header p { font-size:13px; }
.chcf-wrap.chcf-size-narrow .chcf-field { margin-bottom:14px; }
.chcf-wrap.chcf-size-narrow .chcf-field label { font-size:13px; }
.chcf-wrap.chcf-size-narrow .chcf-field input,
.chcf-wrap.chcf-size-narrow .chcf-field select { height:44px; min-height:44px; }

/* Fallback for browsers/environments where ResizeObserver has not run yet. */
@media (max-width:700px) {
  .chcf-wrap:not(.chcf-size-wide) .chcf-grid { grid-template-columns:1fr; gap:0; }
  .chcf-wrap:not(.chcf-size-wide) .chcf-full { grid-column:auto; }
}
@media (max-width:480px) {
  .chcf-wrap:not(.chcf-size-wide) .chcf-card { border-radius:8px; box-shadow:none; }
  .chcf-wrap:not(.chcf-size-wide) .chcf-header { padding:16px; }
  .chcf-wrap:not(.chcf-size-wide) .chcf-form { padding:16px; }
  .chcf-wrap:not(.chcf-size-wide) .chcf-header h2 { font-size:20px; }
  .chcf-wrap:not(.chcf-size-wide) .chcf-header p { font-size:13px; }
}
