/* Protecta V15 — readable controls and natural reflow across the public site.
   Desktop homepage composition is deliberately unchanged. The editor and search
   suggestions own their layouts in studio-v15.css and search-v15.css. */

/* Long customer-entered names, references and messages must stay in their cards. */
body.pd-v11
  :is(
    .shop-cart-item,
    .shop-summary,
    .pc-card,
    .pc-v6-records article,
    .contact-reference,
    .bv-summary,
    .bv-details,
    .shop-empty,
    .shop-results-heading
  ) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.pd-v11 :is(.shop-cart-item, .pc-v6-records article, .shop-results-heading) > * {
  min-width: 0;
}

/* Contact and appointment instructions are essential reading, not fine print. */
body.pd-v11.v5-contact-page
  :is(
    .contact-field label,
    .contact-form-intro,
    .contact-privacy,
    .contact-booking-note p,
    .contact-form-state,
    .v5-contact-detail > p,
    .v5-contact-social
  ) {
  font-size: 14px;
  line-height: 1.6;
}

body.pd-v11.v5-contact-page
  :is(
    .contact-field small,
    .contact-field label span,
    .contact-booking-note small,
    .v5-contact-detail .text-link,
    .v5-contact-detail .text-button
  ) {
  font-size: 13px;
  line-height: 1.6;
}

body.pd-v11.v5-contact-page
  :is(.v5-contact-mobile-actions .button, .v5-contact-direct > .button, #contact-submit) {
  min-height: 44px;
  font-size: 14px;
}

body.pd-v11
  .booking-v5-main
  :is(.bv-field-hint, .bv-bottom-note, .bv-calendar-help, .bv-error, .bv-reference, .bv-secure p) {
  font-size: 13px;
  line-height: 1.6;
}

body.pd-v11
  .booking-v5-main
  :is(.bv-fields label, .bv-service, .bv-ack, .bv-summary, .bv-manage-notes) {
  font-size: 14px !important;
  line-height: 1.55;
}

body.pd-v11
  .booking-v5-main
  :is(.bv-calendar-nav button, .bv-times button, .bv-submit, .bv-manage-actions .button) {
  min-height: 44px;
}

body.pd-v11 .booking-v5-main .bv-calendar-nav button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

body.pd-v11 .booking-v5-main .bv-calendar-nav > div {
  flex-shrink: 0;
}

body.pd-v11 .booking-v5-main .bv-day {
  min-height: 44px;
}

body.pd-v11 .booking-v5-main .bv-service strong {
  font-size: 15px;
  line-height: 1.45;
}

body.pd-v11 .booking-v5-main :is(.bv-service small, .bv-times small, .bv-calendar-legend) {
  font-size: 12px;
  line-height: 1.5;
}

/* The calendar needs seven readable columns; stack it before those get narrow. */
@media (min-width: 761px) and (max-width: 960px) {
  body.pd-v11 .bv-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pd-v11 .bv-calendar-panel {
    position: static;
  }

  body.pd-v11 .bv-day {
    max-height: 64px;
  }
}

@media (max-width: 1080px) {
  body.pd-v11
    :is(
      .v5-header .v5-mobile-nav a,
      .v5-footer .footer-grid > div > a:not(.brand),
      .v5-footer .footer-legal a
    ) {
    font-size: 14px;
  }

  body.pd-v11 .v5-header :is(.v5-header-main, .v5-search, .header-actions) {
    min-width: 0;
  }

  /* Inherited intrinsic image width previously widened the tablet home panel. */
  body.pd-v11 .v5-personalization-panel > * {
    min-width: 0;
    max-width: 100%;
  }

  body.pd-v11 .v5-personalization-photo img {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
  }
}

@media (max-width: 760px) {
  /* 16px fields remain readable and avoid automatic input zoom on iPhones. */
  body.pd-v11
    main:not(.studio-v15)
    :is(input:not([type='checkbox']):not([type='radio']), select, textarea) {
    font-size: 16px;
    min-width: 0;
  }

  body.pd-v11 :is(.shop-form-panel, .pc-auth-form, .pc-v6-editor) label {
    font-size: 14px;
    line-height: 1.55;
  }

  body.pd-v11
    :is(
      .shop-cart-item small,
      .shop-summary small,
      .pc-auth-note p,
      .pc-account-benefits small,
      .pc-v6-document small
    ) {
    font-size: 13px;
    line-height: 1.55;
  }

  body.pd-v11 .shop-product-info h3 {
    font-size: 15px;
    line-height: 1.45;
  }

  body.pd-v11
    :is(.shop-product-info, .shop-cart-item, .shop-summary, .pc-card)
    :is(.button, .shop-link) {
    font-size: 14px;
    min-height: 44px;
  }

  body.pd-v11 :is(.shop-product-meta, .pc-hint, .pc-auth-form .pc-field small) {
    font-size: 13px;
    line-height: 1.5;
  }

  body.pd-v11 .shop-results-heading p:not(.eyebrow) {
    font-size: 13px;
  }

  body.pd-v11 .auto-v5-main .bv-bottom-note {
    font-size: 13px;
    line-height: 1.6;
  }

  body.pd-v11 .shop-results-heading {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  body.pd-v11 .booking-v5-main .bv-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pd-v11 .booking-v5-main .bv-fields > * {
    grid-column: auto;
  }

  body.pd-v11 .booking-v5-main .bv-fields label > small {
    font-size: 12px;
  }

  body.pd-v11 .booking-v5-main .bv-heading-row > div > p:last-child {
    font-size: 15px;
    line-height: 1.6;
  }

  body.pd-v11 .booking-v5-main .bv-manage-actions {
    gap: 10px;
  }

  body.pd-v11 .contact-upload input[type='file'] {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }

  body.pd-v11 .contact-upload input::file-selector-button {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 13px;
    margin-right: 8px;
  }
}

@media (max-width: 380px) {
  /* One comfortable product card is preferable to two unreadably narrow ones. */
  body.pd-v11 :is(.shop-product-grid, .commerce-favorites-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pd-v11 .booking-v5-main .bv-calendar-nav {
    flex-wrap: wrap;
  }

  body.pd-v11 .booking-v5-main .bv-calendar-nav h2 {
    font-size: 21px;
  }

  body.pd-v11 .booking-v5-main .bv-calendar-nav button {
    width: 44px;
    height: 44px;
  }

  body.pd-v11 .booking-v5-main :is(.bv-calendar-days, .bv-weekdays) {
    gap: 3px;
  }
}

/* An open keyboard or landscape screen must not trap a form under sticky chrome. */
@media (max-height: 600px) and (max-width: 1080px) {
  body.pd-v11 :is(.bv-calendar-panel, .shop-summary, .pc-account-sidebar) {
    position: static;
    max-height: none;
  }
}

/* Open filters are a narrow dialog on phones: category names get a full row. */
@media (max-width: 1024px) {
  body.pd-v13[data-page='magazin'] .shop-category-tree {
    grid-template-columns: minmax(0, 1fr);
  }

  body.pd-v13[data-page='magazin'] .shop-category-tree button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.pd-v13[data-page='magazin'] .shop-category-tree button > span {
    min-width: 0;
  }
}

/* Keep every account destination discoverable without a hidden horizontal strip. */
@media (max-width: 850px) {
  body.pd-v11 .pc-account-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  body.pd-v11 .pc-account-nav > :is(button, a) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px;
  }
}

@media (max-width: 520px) {
  body.pd-v11 .pc-account-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
