/* ==========================================================================
   site.css — vanilla layer on top of the original stylesheet (assets/index-pnaei-9s.css).
   Everything that the original React/MUI runtime injected at runtime is ported here,
   plus styles that replicate the MUI appointment form and calendar with plain HTML.
   ========================================================================== */

/* ----- Vanilla-only essentials ----- */
[hidden] { display: none !important; }
body.is-locked { overflow: hidden; }
.skip-link { position: fixed; z-index: 9999; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; background: #fff; color: #8b162d; }
.skip-link:focus { transform: none; }
.site-header { background: #fff; }
.site-nav__toggle { cursor: pointer; }
.osm-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ----- Global baseline (port of MUI CssBaseline) ----- */
html { -webkit-font-smoothing: antialiased; box-sizing: border-box; text-size-adjust: 100%; scrollbar-gutter: stable; }
*, ::before, ::after { box-sizing: inherit; }
strong, b { font-weight: 700; }
body { margin: 0; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Helvetica, Arial, sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.5; letter-spacing: 0.00938em; background-color: #fff; }

/* ----- Layout tweaks (port of the original inline <style> block) ----- */
.jobs__container, .services__container, .contacts__container + section { margin-top: 0.5rem; }
#Termin, section#Termin, section.form__container { margin-top: 0 !important; padding-top: 0 !important; }

/* ----- Back to top (matches the original .return-to-top) ----- */
.back-to-top { position: fixed; right: 30px; bottom: 30px; z-index: 1000; display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border: 0; border-radius: 50%; background-color: rgba(160, 160, 160, 0.29); color: #fff; font-size: 24px; cursor: pointer; transition: opacity 0.5s, visibility 0.3s, background-color 0.3s; outline: none; }
.back-to-top:hover { background-color: rgba(139, 22, 45, 0.75); }

/* ==========================================================================
   Appointment form — vanilla replica of the original MUI form
   ========================================================================== */
.contact-form { width: 820px; }
.appointment-form { width: 100%; padding-bottom: 3px; }
.form-layout.contact-form__user-info-container { display: flex; justify-content: space-between; align-items: flex-start; gap: 0; }
.form-fields { width: 400px; padding-top: 41px; }
.form-fields .field { margin: 0 0 20px; }

/* Outlined field (MUI TextField look): box 56px, label inside, floats to the notch */
.field { position: relative; display: block; margin: 0; color: rgba(0, 0, 0, 0.87); }
.field > span { position: absolute; z-index: 1; top: 16px; left: 9px; max-width: calc(100% - 24px); padding: 0 5px; background: transparent; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: rgba(0, 0, 0, 0.6); font: 400 16px/1.4375 Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.00938em; pointer-events: none; transform-origin: left top; transition: color 0.2s cubic-bezier(0, 0, 0.2, 1), top 0.2s cubic-bezier(0, 0, 0.2, 1), font-size 0.2s cubic-bezier(0, 0, 0.2, 1), background-color 0.2s cubic-bezier(0, 0, 0.2, 1); }
.field b { font-weight: 400; }
.field:focus-within > span { color: #701024; }
.field:focus-within > span,
.field:has(input:not(:placeholder-shown)) > span,
.field:has(textarea:not(:placeholder-shown)) > span { top: -9px; background: #fff; font-size: 12px; }
.field input, .field textarea { display: block; width: 100%; height: 56px; padding: 16.5px 14px; border: 1px solid rgba(0, 0, 0, 0.23); border-radius: 4px; background: #fff; color: rgba(0, 0, 0, 0.87); font: 400 16px/1.4375 Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.00938em; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.field textarea { height: 102px; min-height: 102px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(0, 0, 0, 0.87); }
.field input:focus, .field textarea:focus { border: 2px solid #701024; padding: 15.5px 13px; }
.field.is-valid input, .field.is-valid textarea { border: 2px solid #2e7d32; padding: 15.5px 13px; }
.field.is-invalid input, .field.is-invalid textarea { border: 2px solid #c62828; padding: 15.5px 13px; }
.contact-form__user-message { margin-top: 0; }

/* Insurance (radios) */
.insurance { margin: 34px 0 0; padding: 0; border: 0; }
.insurance legend { margin: 0 0 10px; padding: 0; color: rgba(0, 0, 0, 0.87); font: 400 16px/1.5 Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.00938em; }
.insurance__options { display: flex; gap: 16px; }
.insurance__options label { display: inline-flex; align-items: center; gap: 4px; color: rgba(0, 0, 0, 0.87); font: 500 16px/1.5 Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.00938em; cursor: pointer; }
.insurance__options input { width: 18px; height: 18px; margin: 0; accent-color: #8b162d; cursor: pointer; }
.insurance__options .is-disabled { color: rgba(0, 0, 0, 0.38); cursor: not-allowed; }
.insurance__hint { margin: 7px 0 0; color: #686868; font-size: 12px; }

/* Conditional insurance inputs (full width, stacked) */
.public-insurance { display: block; }
.public-insurance .field { margin-top: 31px; }
.public-insurance .field + .field { margin-top: 24px; }

/* Submit */
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 27px; }
.button { min-height: 53px; border: 0; border-radius: 8px; padding: 10px 20px 11px; background: #8b162d; color: #fff; font-family: "IBM Plex Sans Condensed", Roboto, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 500; line-height: 1.75; letter-spacing: 0.02857em; text-transform: capitalize; cursor: pointer; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.button:hover, .button:focus-visible { background: #701024; text-decoration: none; }
.button:disabled { background: #aaa; cursor: default; }
.button--small { display: inline-block; text-decoration: none; }
.form-status { color: #686868; font-size: 13px; text-align: right; }
.button.is-loading { position: relative; color: transparent; background: #8b162d; pointer-events: none; }
.button.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: button-spin 0.8s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Booking calendar — vanilla replica of the original MUI DateCalendar
   ========================================================================== */
.calendar { width: 320px; height: 336px; padding: 12px 0 0; font-family: Roboto, Helvetica, Arial, sans-serif; box-sizing: border-box; }
.calendar__header { display: flex; align-items: center; height: 40px; padding: 0 6px 0 16px; }
.calendar__header h3 { order: 1; display: flex; align-items: center; margin: 0 auto 0 0; padding: 2px 6px; border: 0; border-radius: 8px; background: transparent; color: rgba(0, 0, 0, 0.87); font-size: 16px; font-weight: 700; letter-spacing: 0.00938em; text-transform: capitalize; cursor: pointer; }
.calendar__header h3:hover { background: rgba(0, 0, 0, 0.05); }
.calendar__header h3::after { content: "▾"; margin-left: 8px; font-size: 12px; color: #8b162d; }
.calendar__header button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #8b162d; font-size: 24px; line-height: 1; cursor: pointer; }
.calendar__header button[data-calendar-prev] { order: 2; }
.calendar__header button[data-calendar-next] { order: 3; margin-left: 4px; }
.calendar__header button:hover:not(:disabled), .calendar__header button:focus-visible { background: rgba(139, 22, 45, 0.08); }
.calendar__header button:disabled { color: rgba(0, 0, 0, 0.26); cursor: default; }
.calendar__weekdays { margin-top: 4px; }
.calendar__weekdays, .calendar__grid { display: grid; grid-template-columns: repeat(7, 40px); justify-content: center; }
.calendar__weekdays span { display: flex; align-items: center; justify-content: center; height: 40px; color: rgba(0, 0, 0, 0.45); font-size: 12px; letter-spacing: 0.03333em; }
.calendar__grid { margin-top: 4px; gap: 4px 0; }
.calendar__day { width: 36px; height: 36px; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(0, 0, 0, 0.87); font: 500 12px/1.66 Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.03333em; cursor: pointer; transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.calendar__day:hover:not(:disabled):not(.is-selected), .calendar__day:focus-visible:not(.is-selected) { background: rgba(25, 118, 210, 0.04); }
.calendar__day.is-selected, .calendar__day.is-selected:hover { background: #8b162d; color: #fff; font-weight: 600; }
.calendar__day.is-selected:hover, .calendar__day.is-selected:focus-visible { background: #701024; }
.calendar__day.is-selected.is-today { box-shadow: none; }
.calendar__day:disabled { color: rgba(0, 0, 0, 0.38); font-weight: 400; cursor: default; }
.calendar__day.is-outside { color: rgba(0, 0, 0, 0.38); font-weight: 400; }
.calendar__day.is-today { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); }

/* Year dropdown view (like the original MUI year list) */
.calendar__years { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 12px 0; align-content: start; height: 280px; margin-top: 4px; padding: 0 0 16px; overflow-y: auto; scrollbar-width: none; }
.calendar__years::-webkit-scrollbar { display: none; }
.calendar__year { width: 72px; height: 36px; padding: 0; border: 0; border-radius: 18px; background: transparent; color: rgba(0, 0, 0, 0.87); font: 500 16px/36px Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0.00938em; text-align: center; cursor: pointer; transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.calendar__year:hover { background: rgba(139, 22, 45, 0.08); }
.calendar__year.is-selected { background: #8b162d; color: #fff; font-weight: 600; }
.calendar__year.is-selected:hover { background: #701024; }
.calendar.has-error .calendar__grid { outline: 2px solid #c62828; border-radius: 4px; }
.field-error { margin: 6px 0 0; color: #c62828; font-size: 12px; }

/* ==========================================================================
   Notice + result modal (vanilla dialogs in the original dr-modal look)
   ========================================================================== */
.result-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 16px; }
.result-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.result-modal__dialog { position: relative; z-index: 1; width: min(560px, 100%); padding: 0; border-radius: 4px; background: #fff; box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28); text-align: center; overflow: hidden; }
.result-modal__dialog h2 { margin: 0; padding: 16px 20px; background: #8b162d; color: #e6e6e6; font: 800 20px/1.2 "Roboto Flex", Roboto, sans-serif; }
.result-modal__dialog p { margin: 0 0 5px; padding: 0 22px; color: rgba(0, 0, 0, 0.87); font: 700 18px/1.5 "Roboto Flex", Roboto, sans-serif; }
.result-modal__dialog div > p:first-child { padding-top: 18px; }
.result-modal__dialog div > p:last-child { padding-bottom: 12px; }
.result-modal__dialog .button { margin: 0 0 20px; }

/* ----- Footer logo link hover (as original) ----- */
.footer__logo { transition: opacity 0.2s ease; }
.footer__logo:hover { opacity: 0.7; }

/* ==========================================================================
   Responsive fine-tuning for the vanilla pieces
   ========================================================================== */
@media (max-width: 900px) {
  .contact-form { width: 92%; }
  .form-layout.contact-form__user-info-container { flex-direction: column-reverse; align-items: center; gap: 20px; }
  .form-fields { width: 100%; max-width: 400px; padding-top: 0; }
  .calendar { width: 320px; max-width: 100%; padding-top: 0; }
  .calendar__weekdays, .calendar__grid { grid-template-columns: repeat(7, minmax(0, 40px)); width: 100%; }
}
@media (max-width: 480px) {
  .calendar__day { width: 34px; height: 34px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-status { min-height: 20px; }
}
