/* === PGHM Anamnese – v3.2 (lifestyle + spacing + file upload) === */
.pghm-anamnese-form, .pghm-anamnese-form * { box-sizing: border-box; }

.pghm-anamnese-form{
  --petrol:#004D4D;
  --fg:#fff;
  --hair:rgba(255,255,255,.16);
  --line:rgba(255,255,255,.28);
  --focus:rgba(255,255,255,.92);
  --fill:rgba(255,255,255,.06);
  --accent:#C0A268;

  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  color: var(--fg);
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  border: none;
  border-radius: 0;
}

/* Desktop vertical progress (right) */
.pghm-progress.pghm-progress-vertical{
  position: sticky;
  top: 80px;
  float: right;
  margin-left: 1rem;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  z-index: 2;
}
.pghm-progress-rail{
  width: 10px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
  position: relative;
}
.pghm-progress-fill{
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--pghm-progress, 0%);
  background: linear-gradient(180deg, var(--accent), #d9c18e);
  border-radius: inherit;
  transition: height .2s ease;
}
.pghm-progress-label{ font-size: .82rem; opacity: .9; }

/* Sections */
.pghm-anamnese-form fieldset{
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 3rem 0;
  position: relative;
}
.pghm-anamnese-form fieldset + fieldset{ margin-top: calc(3rem + 4px); }

.pghm-anamnese-form legend{
  display:inline-block;
  padding: 0 .25rem .4rem 0;
  margin-bottom: 1.25rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--accent);
  border-bottom: 1px solid var(--hair);
}

.pghm-anamnese-form .pghm-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem 1.35rem;
  margin-top:1rem;
}

.pghm-anamnese-form label{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  margin-bottom: 1.05rem;
  font-size: .98rem;
  color: var(--fg);
}

/* Inputs */
.pghm-anamnese-form input[type="text"],
.pghm-anamnese-form input[type="email"],
.pghm-anamnese-form input[type="date"],
.pghm-anamnese-form input[type="number"],
.pghm-anamnese-form input[type="file"],
.pghm-anamnese-form input[type="range"],
.pghm-anamnese-form select,
.pghm-anamnese-form textarea{
  width:100%;
  min-height: 50px;
  padding: 1rem 1.15rem;
  border:1px solid var(--line);
  border-radius:12px;
  background: var(--fill);
  color: var(--fg);
  line-height:1.45;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.pghm-anamnese-form input[type="file"]{ padding: .6rem .9rem; min-height: 44px; }

.pghm-anamnese-form textarea{ min-height: 150px; resize: none; }

/* Range (sleep) minimal styling */
.pghm-anamnese-form input[type="range"]{
  padding: .6rem .6rem;
  min-height: 44px;
  background: transparent;
}
.pghm-anamnese-form input[type="range"] + output{ font-size:.9rem; opacity:.9; margin-top:.2rem; }

.pghm-anamnese-form input[type="date"]::-webkit-calendar-picker-indicator{
  filter: invert(1) opacity(.95);
}

.pghm-anamnese-form select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background:
    linear-gradient(to bottom, transparent, transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>")
      no-repeat right .95rem center;
  background-size: 12px 8px;
  padding-right: 2.4rem;
}
.pghm-anamnese-form select option{ background: var(--petrol); color: var(--fg); }

/* Focus */
.pghm-anamnese-form input:focus,
.pghm-anamnese-form select:focus,
.pghm-anamnese-form textarea:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 .12rem rgba(255,255,255,.10);
  background: rgba(255,255,255,.075);
}

/* Consent */
.pghm-anamnese-form .pghm-consent{
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin: 1.8rem 0 1.2rem;
  color: var(--fg);
  max-width: 64ch;
}
.pghm-anamnese-form .pghm-consent input[type="checkbox"]{
  width: 22px;
  height: 22px;
  margin-top: .25rem;
  accent-color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Mobile bottom progress */
.pghm-progress.pghm-progress-bottom{ display: none; margin: .9rem 0 .2rem; }
.pghm-progress-bottom .pghm-progress-bottom-bar{
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.pghm-progress-bottom .pghm-progress-bottom-bar::before{
  content:"";
  position:absolute; inset:0;
  width: var(--pghm-progress, 0%);
  background: linear-gradient(90deg, var(--accent), #d9c18e);
  border-radius: inherit;
  transition: width .2s ease;
}
.pghm-progress-bottom .pghm-progress-value{
  position:absolute; right:.5rem; top:-20px; font-size:.82rem; opacity:.9;
}

/* Submit */
.pghm-anamnese-form button[type="submit"]{
  margin-top: .6rem;
  padding: 1rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--focus);
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  letter-spacing:.2px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.pghm-anamnese-form button[type="submit"]:hover{ box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.pghm-anamnese-form button[type="submit"]:active{ transform: translateY(1px); }

/* Messages */
.pghm-success, .pghm-errors{
  margin: 1.6rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--fg);
}
.pghm-success{ background: rgba(46,160,67,.18); border-color: rgba(46,160,67,.55); }
.pghm-errors{ background: rgba(255,87,87,.18); border-color: rgba(255,87,87,.55); }

/* Placeholder */
.pghm-anamnese-form ::placeholder{ color: rgba(255,255,255,.65); }

/* Responsive */
@media (max-width: 980px){
  .pghm-progress.pghm-progress-vertical{ display:none; }
  .pghm-progress.pghm-progress-bottom{ display:block; }
}
@media (max-width: 820px){
  .pghm-anamnese-form .pghm-row{ grid-template-columns: 1fr; gap: 1.2rem; }
  .pghm-anamnese-form fieldset{ margin: 2.6rem 0; }
  .pghm-anamnese-form fieldset + fieldset{ margin-top: calc(2.6rem + 4px); }
}
