/* ---- Rezeptformular ("Dauermedikamente bestellen") — brand override ----
   Kept in its own file (not divi-child-1/style.css) because that file is
   overwritten by the theme's "Custom CSS from Generator" export.

   Every declaration is !important: the plugin's own assets/style.css
   (`drs-rezept-css`) does not register as a real WP style dependency —
   declaring it via wp_enqueue_style()'s $deps array had no effect on print
   order (confirmed empirically: this file prints in <head> BEFORE the
   plugin's own stylesheet regardless of hook priority), so normal cascade
   order can't be relied on to make these overrides win. !important sidesteps
   that entirely and stays correct even if the plugin's markup changes again.

   Font: the site's Use Any Font custom typeface (q_reg regular / q_bld
   bold), independent of the active theme — matches uaf.css's
   `body,p,blockquote,li{q_reg}` / `h1,h2,.site-title,strong,b{q_bld}`.

   Color: Divi global colors (Theme Options → Global Colors) — Primary
   #B7CF8D, Secondary #EACE9B, Heading #A5BCDC. All three are pastel
   (contrast ~1.5–1.9:1 on white), well under WCAG's 4.5:1 minimum for
   body text, so they're used as fills/borders/accents here with dark ink
   (#2f3a3f) kept for anything that needs to be read — not as standalone
   text color. */

.drs-urlaub-notice {
  width: 100% !important;
  margin: 30px auto !important;
  box-sizing: border-box !important;
  font-family: "q_reg", sans-serif !important;
}

.drs-formular-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 30px !important;
  margin-bottom: 30px !important;
  color: #2f3a3f !important;
  font-family: "q_reg", sans-serif !important;
}

.drs-urlaub-notice + .drs-formular-wrapper {
  margin-top: 0 !important;
}

.drs-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

.drs-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.drs-field label {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: #2f3a3f !important;
  font-family: "q_bld", sans-serif !important;
}

.drs-field input[type="text"],
.drs-field input[type="email"] {
  width: 100% !important;
  padding: 10px 13px !important;
  border: 1px solid #b6bbc1 !important;
  border-radius: 4px !important;
  font-size: 1.2rem !important;
  font-family: "q_reg", sans-serif !important;
  color: #2f3a3f !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

.drs-field input:focus {
  outline: none !important;
  border-color: #B7CF8D !important;
  box-shadow: 0 0 0 2px rgba(183, 207, 141, 0.45) !important;
}

.drs-field input.drs-invalid {
  border-color: #c0392b !important;
}

.drs-req { color: #c0392b !important; margin-left: 2px !important; }

.drs-err {
  font-size: 0.85rem !important;
  color: #c0392b !important;
  min-height: 1em !important;
  display: block !important;
}

.drs-section-title {
  display: none !important;
}

.drs-med-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.drs-med-fields {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr !important;
  gap: 12px !important;
  flex: 1 !important;
}

@media (max-width: 600px) {
  .drs-med-fields { grid-template-columns: 1fr !important; }
}

.drs-remove-med {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  min-height: 44px !important;
  background: none !important;
  border: none !important;
  border-radius: 4px !important;
  color: #5a6469 !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  align-self: flex-start !important;
  margin-top: 6px !important;
}

.drs-remove-med:hover { color: #c0392b !important; opacity: 0.7 !important; }

.drs-btn-add {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 2px solid #EACE9B !important;
  color: #000000 !important;
  padding: 0.3em 1em !important;
  border-radius: 50px !important;
  font-size: 20px !important;
  font-weight: normal !important;
  font-family: "q_bld", sans-serif !important;
  line-height: 1.7em !important;
  cursor: pointer !important;
  align-self: flex-start !important;
}

.drs-btn-add:hover { opacity: 0.7 !important; }

.drs-checkbox-wrap { margin-top: 4px !important; }

.drs-checkbox-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-size: 1.2rem !important;
  color: #2f3a3f !important;
  font-weight: normal !important;
}

.drs-checkbox-label input[type="checkbox"] {
  margin-top: 3px !important;
  width: 17px !important;
  height: 17px !important;
  flex-shrink: 0 !important;
  accent-color: #B7CF8D !important;
  cursor: pointer !important;
}

.drs-btn-submit {
  width: 100% !important;
  padding: 0.3em 1em !important;
  background: #B7CF8D !important;
  color: #000000 !important;
  border: none !important;
  border-radius: 50px !important;
  font-size: 20px !important;
  font-weight: normal !important;
  font-family: "q_bld", sans-serif !important;
  line-height: 1.7em !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease-in-out !important;
  margin-top: 4px !important;
}

.drs-btn-submit:hover { opacity: 0.8 !important; }
.drs-btn-submit:disabled { opacity: 0.5 !important; cursor: not-allowed !important; }

#drs-messages { overflow: hidden !important; }

.drs-msg-success {
  background: rgba(183, 207, 141, 0.15) !important;
  border: 1px solid #B7CF8D !important;
  color: #2f3a3f !important;
  padding: 14px 18px !important;
  font-size: 1.2rem !important;
  line-height: 1.6 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.drs-msg-success strong { color: #2f3a3f !important; }

.drs-msg-error {
  background: #fdf3f2 !important;
  border: 1px solid #e74c3c !important;
  color: #a93226 !important;
  padding: 14px 18px !important;
  font-size: 1.2rem !important;
  line-height: 1.6 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

/* ---- /urlaub Seite: Formular zum Eintragen des Urlaubszeitraums ----
   Eigene, unabhängige Klassen (san-urlaub-*, nicht drs-*), weil sie
   nichts vom Plugin drs-rezept-formular überschreiben — dessen eigener
   .drs-urlaub-notice-Hinweis (oben im Bestellformular selbst) bleibt
   unberührt. */
.san-urlaub-formular-hinweis {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  background: rgba(89, 121, 138, 0.08);
  border: 1px solid #59798a;
  border-radius: 4px;
  color: #2f3a3f;
}

.san-urlaub-formular-hinweis p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.san-urlaub-formular-hinweis--fehler {
  background: #fdf3f2;
  border-color: #e74c3c;
  color: #a93226;
}

.san-urlaub-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 680px;
  margin: 24px auto 0;
}

/* [san_urlaub_info] Shortcode-Output, frei auf beliebigen Seiten platzierbar */
.san-urlaub-info {
  font-family: "q_reg", sans-serif;
  color: #2f3a3f;
  line-height: 1.6;
}

/* Der Shortcode gibt außerhalb seines Sichtbarkeitsfensters '' zurück —
   das umgebende Divi-Modul (#urlaub) bleibt aber als leerer Wrapper
   (eigene innere Divs, daher kein :empty-Treffer) mit Padding stehen.
   :has() blendet den ganzen Wrapper aus, wenn kein .san-urlaub-info
   darin steckt. */
#urlaub:not(:has(.san-urlaub-info)) {
  display: none !important;
}

/* [san_hinweis] Shortcode-Output. Gleiches Muster wie #urlaub oben: die
   umgebende Divi-Section (#hinweis, mit Hintergrundfarbe im Builder
   vergeben) bleibt ohne diese Regel als leerer, farbiger Streifen stehen,
   wenn kein Hinweistext eingetragen ist. */
.san-hinweis-info {
  font-family: "q_bld", sans-serif;
  color: #2f3a3f;
  line-height: 1.6;
}

#hinweis:not(:has(.san-hinweis-info)) {
  display: none !important;
}
