/* Café am Kloster: one responsive layer after the parent theme, 16.10.2026. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body .container, body .ctacontainer, body .headercontainer, body .page-content,
body .footer, body .footer-box, body input, body textarea { box-sizing: border-box; }
body .container, body .ctacontainer { width: 100%; max-width: 1180px; }
body .page-content { padding: clamp(16px, 3vw, 32px); }
body article, body #sidebar, body .footer-box { min-width: 0; overflow-wrap: break-word; }
body article img { max-width: 100%; height: auto; }
body a:focus-visible, body button:focus-visible, body input:focus-visible,
body textarea:focus-visible { outline: 3px solid #8b3d29; outline-offset: 3px; }

/* A stable, readable header whose logo and navigation share available space. */
body .headercontainer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: calc(100% - 32px); max-width: 1160px; min-height: 72px; height: auto;
  padding: 10px 16px; background: #fff; border-radius: 2px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 10%);
}
body .headercontainer .logocontainer { float: none !important; padding: 0; margin: 0; max-width: none; flex: 0 0 auto; }
body .headercontainer .logo { padding: 0; margin: 0; max-width: none; max-height: none; }
body .headercontainer .logotitle a { font-size: 28px; line-height: 1.2; white-space: nowrap; }
body .headercontainer .menucontainer { position: static; float: none !important; width: auto; margin: 0; pointer-events: auto; }
body .headercontainer #topmenu { position: static; width: auto; float: none; margin: 0; }
body .headercontainer #topmenu::after, body .headercontainer #topmenu > ul::after { content: none; }
body .headercontainer #topmenu #head-mobile { display: none !important; }
body .headercontainer #topmenu > ul {
  display: flex; align-items: center; width: auto; float: none !important;
  margin: 0; padding: 0; max-height: none; overflow: visible;
}
body .headercontainer #topmenu li { float: none; width: auto; height: auto; padding: 0; margin: 0; position: relative; }
body .headercontainer #topmenu > ul > li { display: block; border: 0; }
body .headercontainer #topmenu a { font-size: 13px; line-height: 1.5; padding: 14px 11px; min-height: 48px; white-space: nowrap; color: #51494a; }
body .headercontainer #topmenu li.has-sub > a { padding-right: 46px; }
body .headercontainer #topmenu a::before, body .headercontainer #topmenu a::after { display: none; }
body .headercontainer #topmenu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; right: auto; margin: 0;
  width: 300px; max-width: calc(100vw - 48px); padding: 4px 0;
  border-top: 2px solid #dc6341; background: #fff; box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
}
body .headercontainer #topmenu .submenu-open > .sub-menu { display: block; }
body .headercontainer #topmenu .sub-menu li,
body .headercontainer #topmenu li:hover > ul > li { display: block; width: 100%; height: auto; white-space: normal; margin: 0 !important; }
body .headercontainer #topmenu .sub-menu a { min-width: 0; white-space: normal; padding: 12px 18px; min-height: 44px; }
body .headercontainer #topmenu .sub-menu .sub-menu { position: static; width: 100%; box-shadow: none; border: 0; padding-left: 14px; box-sizing: border-box; }
body .headercontainer #topmenu .mobilebutton { display: none; }
body .headercontainer #topmenu .submenu-button {
  display: block; position: absolute; top: 2px; right: 2px; width: 40px; height: 44px;
  border: 0; border-radius: 2px; background: transparent; color: #51494a; cursor: pointer;
}
body .headercontainer #topmenu .submenu-button::before,
body .headercontainer #topmenu .submenu-button::after { content: ''; position: absolute; display: block; background: currentColor; }
body .headercontainer #topmenu .submenu-button::after { width: 12px; height: 2px; left: 14px; top: 21px; }
body .headercontainer #topmenu .submenu-button::before { width: 2px; height: 12px; left: 19px; top: 16px; }
body .headercontainer #topmenu .submenu-button[aria-expanded="true"]::before { display: none; }
body .headercontainer #topmenu .submenu-button:hover, body .headercontainer #topmenu a:hover { background: #f6f3f1; }
.cafe-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Footer grids replace the legacy float widths at every breakpoint. */
body .footercontainer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 0; }
body .footer-widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; grid-column: 1 / -1; width: 100%; }
body .footer .footer-box { width: auto !important; float: none; margin: 0 !important; }
body .footer .clear { display: none; }
body .footercontainer > .col-ohc { width: auto !important; margin: 0 !important; float: none !important; display: block !important; }
body .footer .bottomline { padding: 0; }
body .footer .footerboxtitle { line-height: 1.4; }
body .footer .cafe-phone-link { white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* Preserve form names and delivery, improve readable controls and labels. */
body .wpcf7 form { max-width: 760px; }
body .wpcf7 .wpcf7-form-control-wrap { display: block; }
body .wpcf7 .cafe-field-label { display: block; margin-bottom: 6px; color: #51494a; font-weight: 600; }
body .wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body .wpcf7 textarea { width: 100%; max-width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; line-height: 1.5; border: 1px solid #c5bfbd; border-radius: 2px; background: #fff; }
body .wpcf7 textarea { min-height: 180px; resize: vertical; }
body .wpcf7 input[type="submit"] { min-height: 44px; padding: 10px 24px; }
body .wpcf7 input[type="checkbox"] { width: 20px; height: 20px; vertical-align: middle; }

/* Use the available gallery width and a controllable, non-autoplay carousel. */
body .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
body .gallery .gallery-item { float: none !important; width: auto !important; margin: 0 !important; }
body .gallery br { display: none; }
body .gallery img { display: block; width: 100%; height: auto; }
body .carouselsection { padding: 0 40px 28px; box-sizing: border-box; }
body .cafe-carousel .carousel-item { padding: 0 6px; box-sizing: border-box; }
body .cafe-carousel img { display: block; width: 100%; height: auto; }
body .cafe-carousel .slick-prev { left: -38px; }
body .cafe-carousel .slick-next { right: -38px; }
body .cafe-carousel .slick-prev, body .cafe-carousel .slick-next { width: 36px; height: 44px; }
body .cafe-carousel .slick-prev::before, body .cafe-carousel .slick-next::before { color: #51494a; }
body .cafe-carousel .slick-dots { position: static; margin-top: 12px; }
body .cafe-carousel .slick-dots li { width: 28px; height: 32px; margin: 0; }
body .cafe-carousel .slick-dots li button { width: 28px; height: 32px; }
.cafe-image-dialog { box-sizing: border-box; width: min(1100px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 16px; border: 0; border-radius: 4px; background: #fff; color: #51494a; }
.cafe-image-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.cafe-image-dialog img { display: block; max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; margin: 0 auto; object-fit: contain; }
.cafe-image-controls { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.cafe-image-controls button { min-height: 44px; padding: 8px 14px; border: 1px solid #bcb5b2; background: #fff; color: #51494a; border-radius: 2px; cursor: pointer; font: inherit; }
.cafe-image-caption { text-align: center; margin: 12px 0 0; }

@media (max-width: 1119.98px) {
  body .headercontainer { gap: 12px; }
  body .headercontainer #topmenu .mobilebutton {
    display: block; position: relative; top: auto; right: auto; width: 48px; height: 48px;
    border: 0; padding: 0; border-radius: 2px; background: transparent; color: #51494a; cursor: pointer;
  }
  body .headercontainer #topmenu .mobilebutton::before { content: ''; position: absolute; display: block; top: 12px; right: 10px; width: 28px; height: 4px; background: currentColor; transform: none; }
  body .headercontainer #topmenu .mobilebutton::after { content: ''; position: absolute; display: block; top: 22px; right: 10px; width: 28px; height: 6px; border-top: 4px solid currentColor; border-bottom: 4px solid currentColor; background: transparent; transform: none; }
  body .headercontainer #topmenu .mobilebutton[aria-expanded="true"]::before { top: 23px; transform: rotate(-45deg); }
  body .headercontainer #topmenu .mobilebutton[aria-expanded="true"]::after { top: 23px; height: 4px; border: 0; background: currentColor; transform: rotate(45deg); }
  body .headercontainer #topmenu > ul {
    display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%;
    align-items: stretch; margin: 0; background: #fff; border-top: 1px solid #ded8d4;
    max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px);
    overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 6px 10px rgb(0 0 0 / 10%);
  }
  body .headercontainer #topmenu.is-menu-open > ul { display: block; }
  body .headercontainer #topmenu > ul > li { width: 100%; border-bottom: 1px solid #ebe7e5; }
  body .headercontainer #topmenu > ul > li:last-child { border-bottom: 0; }
  body .headercontainer #topmenu a { display: block; min-height: 52px; padding: 15px 18px; white-space: normal; }
  body .headercontainer #topmenu .has-sub > a { padding-right: 64px; }
  body .headercontainer #topmenu .sub-menu { position: static; left: 0; width: 100%; max-width: none; box-sizing: border-box; border: 0; border-top: 1px solid #dc6341; padding: 0; box-shadow: none; background: #f8f6f4; }
  body .headercontainer #topmenu .sub-menu a { padding-left: 28px; }
  body .headercontainer #topmenu .submenu-button { top: 4px; right: 8px; width: 44px; }
}
@media (max-width: 1000px) {
  body .footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  body .col-ttfull, body .col-otfull { width: 100%; float: none; display: block; }
  body #sidebar { padding-left: 0; margin-top: 24px; }
}
@media (max-width: 640px) {
  body .headercontainer { top: 16px; width: calc(100% - 24px); padding: 8px 12px; min-height: 64px; }
  body .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .headercontainer #topmenu > ul { max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); }
}
@media (max-width: 600px) {
  body .footer-widgets, body .footercontainer { grid-template-columns: minmax(0, 1fr); }
  body .footer .bottomline { text-align: left; }
  body .footer-widgets { gap: 24px; }
  body .carouselsection { padding-left: 36px; padding-right: 36px; }
}
@media (max-width: 380px) {
  body .headercontainer .logotitle a { font-size: 25px; }
  body .gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body .headercontainer *, body .cafe-carousel * { transition: none !important; animation: none !important; }
}

/* Neutralize float clearfix pseudo-elements inside the flex header. */
body .headercontainer::before, body .headercontainer::after, body .headercontainer .menucontainer::before, body .headercontainer .menucontainer::after { content: none; }
body .headercontainer .logotitle { font-size: 28px; line-height: 1.2; text-shadow: none; }

body .social-topline { box-sizing: border-box; width: calc(100% - 32px); max-width: 1160px; }
body .social-topline .clear { width: 100%; }
body .cafe-room-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
body .cafe-room-gallery br { display: none; }
body .cafe-room-gallery a, body .cafe-room-gallery img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; }
@media (max-width: 900px) { body .cafe-room-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { body .cafe-room-gallery { grid-template-columns: minmax(0, 1fr); } }

/* The callback panel uses a legacy two-column layout table. */
body .cta-inner table { width: 100%; table-layout: fixed; }
body .cta-inner th { box-sizing: border-box; vertical-align: top; overflow-wrap: anywhere; }
body .cta-inner .cafe-field-label { color: #fff; text-align: left; }
body .wpcf7 input[type="submit"] { max-width: 100%; white-space: normal; }
@media (max-width: 800px) {
  body .cta-inner table, body .cta-inner tbody, body .cta-inner tr, body .cta-inner th { display: block; width: 100%; }
  body .cta-inner { padding: 24px 16px; box-sizing: border-box; }
  body .cta-inner .wpcf7 { padding: 0; }
}
/* Theme options had disabled carousel arrows globally. */
body .cafe-carousel .slick-prev, body .cafe-carousel .slick-next { display: block !important; }
@media (max-width: 600px) {
  body .cafe-carousel .slick-prev { left: -34px; }
  body .cafe-carousel .slick-next { right: -34px; }
}
body .headercontainer #topmenu li.has-sub > a::before,
body .headercontainer #topmenu li.has-sub > a::after { display: none !important; content: none; }
