/*
Theme Name: HMS-Eren Child
Theme URI: https://hms-eren.de/
Description: Child theme for Hausmeisterservice Eren.
Author: Hausmeisterservice Eren
Template: hello-elementor
Version: 2.1.2
Text Domain: hms-eren-child
*/

/* Keep Complianz's consent logic; override presentation only. */
body .cmplz-cookiebanner {
    zoom: 1 !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    box-sizing: border-box;
    width: min(520px, calc(100% - 32px)) !important;
    max-width: calc(100% - 32px) !important;
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    padding: 24px !important;
    border: 1px solid var(--hms-border, #d6e1e5) !important;
    border-radius: 12px !important;
    background: var(--hms-surface, #fff) !important;
    color: var(--hms-text, #16384b) !important;
    box-shadow: 0 12px 48px #071f3033 !important;
    font-family: 'Segoe UI', sans-serif !important;
    right: 16px !important;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
}
body .cmplz-cookiebanner > * { grid-column: 1 / -1 !important; min-width: 0; }
body .cmplz-cookiebanner * { zoom: 1 !important; }
body .cmplz-cookiebanner .cmplz-documents,
body .cmplz-cookiebanner .cmplz-information { zoom: 1 !important; }
body .cmplz-cookiebanner .cmplz-header { max-height: none !important; }
body .cmplz-cookiebanner .cmplz-title { justify-self: stretch; }
body .cmplz-cookiebanner .cmplz-title,
body .cmplz-cookiebanner .cmplz-message { width: auto !important; max-width: 100%; }
body .cmplz-cookiebanner .cmplz-title,
body .cmplz-cookiebanner .cmplz-message,
body .cmplz-cookiebanner .cmplz-category-title,
body .cmplz-cookiebanner .cmplz-description,
body .cmplz-cookiebanner .cmplz-always-active { color: var(--hms-text, #16384b) !important; }
body .cmplz-cookiebanner .cmplz-header { display: grid !important; grid-template-columns: minmax(0, 1fr) 44px !important; gap: 12px; align-items: start; min-height: 44px !important; height: auto !important; }
body .cmplz-cookiebanner .cmplz-logo { display: none !important; }
body .cmplz-cookiebanner .cmplz-title { display: block !important; grid-column: 1; text-align: left !important; padding-block: 9px; font-family: 'Trebuchet MS', sans-serif; font-size: 20px !important; line-height: 1.3 !important; font-weight: 700; }
body .cmplz-cookiebanner .cmplz-message { font-size: 15px !important; line-height: 1.65 !important; }
body .cmplz-cookiebanner .cmplz-category { background: var(--hms-panel, #f1f6f7) !important; border-color: var(--hms-border, #d6e1e5) !important; }
body .cmplz-cookiebanner .cmplz-links a { color: var(--hms-link, #17668a) !important; text-decoration: underline; text-underline-offset: 3px; }
body .cmplz-cookiebanner .cmplz-buttons { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    zoom: 1 !important;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    font: 600 15px/1.3 'Segoe UI', sans-serif !important;
    white-space: normal;
    border-radius: 8px !important;
}
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept,
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny {
    background: #17668a !important;
    border: 1px solid #17668a !important;
    color: #fff !important;
}
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover,
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny:hover { background: #104b67 !important; border-color: #104b67 !important; }
body .cmplz-cookiebanner .cmplz-view-preferences,
body .cmplz-cookiebanner .cmplz-save-preferences,
body .cmplz-cookiebanner .cmplz-buttons .cmplz-manage-options {
    grid-column: 1 / -1;
    background: var(--hms-panel, #f1f6f7) !important;
    border: 1px solid var(--hms-border, #d6e1e5) !important;
    color: var(--hms-text, #16384b) !important;
}
body .cmplz-cookiebanner .cmplz-close { color: var(--hms-text, #16384b) !important; position: static !important; grid-column: 2; grid-row: 1; width: 44px; height: 44px; display: grid; place-items: center; }
body .cmplz-cookiebanner .cmplz-close svg { width: 14px; height: 14px; }
body .cmplz-cookiebanner .cmplz-category-toggle { min-width: 44px; min-height: 44px; }
body .cmplz-cookiebanner :focus-visible,
body #cmplz-manage-consent button:focus-visible { outline: 3px solid var(--hms-link, #17668a) !important; outline-offset: 3px; }

/* Shared geometry prevents the consent control drifting from the contact dock. */
body {
    --hms-floating-size: 48px;
    --hms-floating-gap: 12px;
    --hms-floating-right: max(16px, env(safe-area-inset-right, 0px));
    --hms-floating-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
body .hms-site .hms-quick-contact {
    right: var(--hms-floating-right);
    bottom: var(--hms-floating-bottom);
    gap: var(--hms-floating-gap);
    width: var(--hms-floating-size);
}
body .hms-site .hms-social-menu summary,
body .hms-site .hms-back-top {
    box-sizing: border-box;
    width: var(--hms-floating-size);
    height: var(--hms-floating-size);
    min-width: var(--hms-floating-size);
    min-height: var(--hms-floating-size);
    padding: 11px;
    border-radius: 50%;
    box-shadow: 0 4px 16px #071f3026;
    touch-action: manipulation;
}
body .hms-site .hms-social-menu summary svg,
body .hms-site .hms-back-top svg { width: 24px; height: 24px; }
body .hms-site .hms-social-popover { bottom: calc(var(--hms-floating-size) + var(--hms-floating-gap)); }
body #cmplz-manage-consent button.cmplz-manage-consent {
    left: auto !important;
    right: calc(var(--hms-floating-right) + var(--hms-floating-size) + var(--hms-floating-gap)) !important;
    bottom: var(--hms-floating-bottom) !important;
    width: var(--hms-floating-size) !important;
    min-width: var(--hms-floating-size) !important;
    box-sizing: border-box;
    height: var(--hms-floating-size) !important;
    min-height: var(--hms-floating-size);
    padding: 11px !important;
    margin: 0 !important;
    font-size: 0 !important;
    border: 1px solid var(--hms-border, #d6e1e5) !important;
    border-radius: 50% !important;
    background: var(--hms-surface, #fff) !important;
    color: var(--hms-text, #16384b) !important;
    box-shadow: 0 0 20px #071f3026 !important;
    transform: none !important;
    transition: transform 180ms ease !important;
    touch-action: manipulation;
}
body #cmplz-manage-consent button.cmplz-manage-consent::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M21 12a9 9 0 1 1-9-9 3 3 0 0 0 3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 3Z'/%3E%3Cg fill='black'%3E%3Ccircle cx='7.5' cy='9' r='1'/%3E%3Ccircle cx='8' cy='15' r='1'/%3E%3Ccircle cx='13.5' cy='15.5' r='1'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    body #cmplz-manage-consent button.cmplz-manage-consent { bottom: 0 !important; transform: translateY(50%) !important; }
    body #cmplz-manage-consent button.cmplz-manage-consent:hover,
    body #cmplz-manage-consent button.cmplz-manage-consent:focus-visible { transform: translateY(-12px) !important; }
}
body .hms-footer button.hms-cookie-settings {
    position: static !important;
    display: inline-block !important;
    visibility: visible !important;
    transform: none !important;
    width: auto !important;
    min-height: 44px;
    height: auto !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    font: inherit !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}
body .hms-footer button.hms-cookie-settings:focus-visible { outline: 3px solid #b2ecd2 !important; outline-offset: 4px; }
@media (max-width: 480px) {
    body .cmplz-cookiebanner { padding: 18px !important; }
    body .cmplz-cookiebanner .cmplz-body { max-height: clamp(120px, calc(100dvh - 410px), 320px) !important; }
    body .cmplz-cookiebanner .cmplz-buttons { grid-template-columns: 1fr; }
    body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { body #cmplz-manage-consent button.cmplz-manage-consent { transition: none !important; } }
@media print { body .cmplz-cookiebanner, body #cmplz-manage-consent { display: none !important; } }

/* The review provider remains recognisable; cards use the site's own surfaces. */
body .hms-reviews-section .wp-gr { font-family: 'Segoe UI', sans-serif !important; color: var(--hms-text) !important; }
body .hms-reviews-section .wp-gr .grw-header { padding: 0 0 28px !important; border-bottom: 1px solid var(--hms-border); margin-bottom: 28px !important; }
body .hms-reviews-section .wp-gr .grw-reviews { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px !important; }
body .hms-reviews-section .wp-gr .grw-review { width: auto !important; min-width: 0; margin: 0 !important; padding: 0 !important; align-items: stretch !important; }
body .hms-reviews-section .wp-gr .grw-review-inner { height: 100%; box-sizing: border-box; padding: 28px !important; border: 1px solid var(--hms-border) !important; border-radius: 10px !important; background: var(--hms-panel) !important; box-shadow: none !important; }
body .hms-reviews-section .wp-gr .wp-google-name,
body .hms-reviews-section .wp-gr .wp-google-name a,
body .hms-reviews-section .wp-gr .wp-google-text { color: var(--hms-text) !important; font-family: inherit !important; }
body .hms-reviews-section .wp-gr .wp-google-name { font-weight: 700 !important; }
body .hms-reviews-section .wp-gr .wp-google-time,
body .hms-reviews-section .wp-gr .wp-google-based,
body .hms-reviews-section .wp-gr .wp-google-powered { color: var(--hms-subtle) !important; }
body .hms-reviews-section .wp-gr .wp-google-text { font-size: 16px !important; line-height: 1.75 !important; }
body .hms-reviews-section .wp-gr .wp-google-feedback { max-height: none !important; overflow: visible !important; }
body .hms-reviews-section .wp-gr .grw-review,
body .hms-reviews-section .wp-gr .grw-review-inner,
body .hms-reviews-section .wp-gr .grw-review .rpi-col4,
body .hms-reviews-section .wp-gr .wp-google-feedback { height: auto !important; overflow: visible !important; }
body .hms-reviews-section .wp-gr .wp-google-text { overflow: visible !important; }
body .hms-reviews-section .wp-gr .wp-google-wr a { min-height: 44px; border-radius: 8px !important; background: #17668a !important; color: #fff !important; padding: 12px 18px !important; }
@media (max-width: 767px) { body .hms-reviews-section .wp-gr .grw-reviews { grid-template-columns: 1fr; gap: 16px !important; } body .hms-reviews-section .wp-gr .grw-review-inner { padding: 22px !important; } }

/* Dynamic gallery: the surrounding Elementor section remains editable. */
body .hms-gallery .hms-gallery-managed { grid-column: 1 / -1; width: 100%; }
body .hms-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 100%; }
body .hms-work-card { margin: 0; overflow: hidden; border: 1px solid var(--hms-border); border-radius: 10px; background: var(--hms-surface); }
body .hms-work-image { overflow: hidden; aspect-ratio: 4 / 3; background: var(--hms-panel); }
body .hms-work-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
body .hms-work-caption { padding: 22px; color: var(--hms-text); font-style: normal; }
body .hms-work-caption h3 { margin: 0 0 8px; font: 700 21px/1.3 'Trebuchet MS', sans-serif; color: var(--hms-text); }
body .hms-work-caption p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--hms-subtle); }
@media (hover: hover) and (pointer: fine) { body .hms-work-card:hover img { transform: scale(1.035); } }
@media (max-width: 1024px) { body .hms-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { body .hms-work-grid { grid-template-columns: 1fr; gap: 20px; } }
@media (prefers-reduced-motion: reduce) { body .hms-work-image img { transition: none; transform: none !important; } }

/* One photo source, a bounded home preview, and a separate paginated gallery. */
body .hms-gallery-unified { width: 100%; }
body .hms-gallery-unified .hms-work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
body .hms-gallery-preview .hms-work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
body .hms-gallery-unified .hms-work-image { display: block; position: relative; aspect-ratio: 3 / 2; height: auto; border-radius: 0; }
body .hms-gallery-unified .hms-work-image img { aspect-ratio: 3 / 2; height: 100%; }
body .hms-gallery-preview .hms-work-caption { padding: 16px; }
body .hms-gallery-preview .hms-work-caption h3 { font-size: 18px; line-height: 1.4; margin: 0; }
body .hms-ui-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
body .hms-work-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff66; border-radius: 50%; background: #101f29b8; color: #fff; pointer-events: none; }
body .hms-gallery-count { margin: 0 0 24px; color: var(--hms-subtle); }
body .hms-gallery-more { display: flex; justify-content: center; margin-top: 28px; }
body .hms-gallery-more a, body .hms-gallery-pagination a { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 12px 24px; border: 1px solid var(--hms-link); border-radius: 8px; background: #17668a; color: #fff; font-weight: 600; text-decoration: none; }
body .hms-gallery-more a:hover, body .hms-gallery-pagination a:hover { background: #104b67; }
body .hms-gallery-more a, body .hms-gallery-pagination a { font-size: 16px; line-height: 1.5; touch-action: manipulation; transition: background-color 180ms ease, border-color 180ms ease; }
body .hms-gallery-more a:active, body .hms-gallery-pagination a:active { background: #104b67; }
body .hms-gallery-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 32px; }
body .hms-gallery-unified a:focus-visible { outline: 3px solid var(--hms-link); outline-offset: 4px; }
body .hms-site .hms-gallery-intro { padding-block: 64px 28px; }
body .hms-site .hms-gallery-page-section { padding-block: 24px 72px; }
@media (max-width: 1024px) {
    body .hms-gallery-unified .hms-work-grid, body .hms-gallery-preview .hms-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    body .hms-gallery-unified .hms-work-grid, body .hms-gallery-preview .hms-work-grid { gap: 16px; }
    body .hms-gallery-preview .hms-work-caption { padding: 12px; }
    body .hms-gallery-preview .hms-work-caption h3 { font-size: 16px; }
    body .hms-gallery-full .hms-work-caption { padding: 16px; }
    body .hms-gallery-full .hms-work-caption h3 { font-size: 18px; }
    body .hms-site .hms-gallery-intro { padding-block: 40px 16px; }
}
@media (max-width: 640px) { body .hms-gallery-full .hms-work-grid { grid-template-columns: 1fr; } }
body .hms-gallery-lightbox [tabindex="0"]:focus-visible { outline: 3px solid #b2ecd2; outline-offset: 4px; }
/* Keep the photo viewer focused; Elementor's optional share SVG has no name. */
body .hms-gallery-lightbox .e-eicon-share-arrow { display: none; }
body .hms-gallery-lightbox { background-color: #071118f5; }
body .hms-gallery-lightbox .elementor-swiper-button {
    position: absolute; top: 50%; bottom: auto; z-index: 2;
    transform: translateY(-50%);
    width: 48px; height: 48px; padding: 12px; box-sizing: border-box;
    border: 1px solid #ffffff66; border-radius: 50%;
    background: #101f29b8; color: #fff; touch-action: manipulation;
}
/* Elementor's responsive lightbox rules force the native buttons to the edges. */
body .hms-gallery-lightbox .elementor-swiper-button-next { right: 12px !important; left: auto !important; }
body .hms-gallery-lightbox .elementor-swiper-button-prev { left: 12px !important; right: auto !important; }
body .hms-gallery-lightbox .elementor-swiper-button:hover { background: #101f29; }
body .hms-gallery-lightbox .elementor-swiper-button > * { display: none; }
body .hms-gallery-lightbox .elementor-swiper-button::before {
    content: ''; display: block; width: 24px; height: 24px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body .hms-gallery-lightbox .elementor-swiper-button-prev::before { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { body .hms-gallery-more a, body .hms-gallery-pagination a { transition: none; } }
