/* von Kannen Fixes - Korrekturen (frueher in custom.css des Templates) */

/* Meldungen (Toast) immer ueber Modal-/Popup-Overlays */
html:root #system-message-container { z-index: 2147483000 !important; }

/* Konto-Seiten mit Verwaltungs-Modul: Breite wie .sppb-row-container begrenzen */
html:root body.remove-container:has(#sp-sidebar-l [data-module_id="372"]) #sp-main-body { max-width: 1630px; margin-left: auto; margin-right: auto; }

/* Passkey-Verwaltung (Joomla WebAuthn): Tabelle und Buttons im Shop-Stil */
html:root #plg_system_webauthn-management-interface table { width: 100%; table-layout: auto; margin-bottom: 15px; }
html:root #plg_system_webauthn-management-interface th, html:root #plg_system_webauthn-management-interface td { vertical-align: middle; padding: 10px 15px; }
html:root #plg_system_webauthn-management-interface thead th:last-child, html:root #plg_system_webauthn-management-interface td.webauthnManagementCell { width: 1%; white-space: nowrap; text-align: right; }
html:root #plg_system_webauthn-management-interface th.webauthnManagementCell { width: auto; font-weight: 400; text-align: left; }
html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow input { flex: 1 1 120px; min-width: 0; width: auto; max-width: 360px; }
html:root #plg_system_webauthn-management-interface .btn, html:root #plg_system_webauthn-manage-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; width: auto;
  font-size: 14px; line-height: 1; border-radius: 4px; border: 0; border-bottom: 2px solid var(--cera-blue-light); white-space: nowrap; box-sizing: border-box;
  background: var(--cera-blue-strong); color: var(--cera-white); cursor: pointer; margin: 0;
}
html:root #plg_system_webauthn-management-interface .btn:hover:not(:disabled), html:root #plg_system_webauthn-management-interface .btn:focus:not(:disabled) { background: var(--cera-blue-light); color: var(--cera-white); }
html:root #plg_system_webauthn-management-interface .btn:disabled { opacity: .45; cursor: default; }
html:root #plg_system_webauthn-management-interface .btn-danger, html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow .btn-danger { background: #c9302c; border-bottom-color: #a02622; }
html:root #plg_system_webauthn-management-interface .btn-danger:hover:not(:disabled) { background: #a02622; }
html:root #plg_system_webauthn-management-interface td.webauthnManagementCell .btn + .btn { margin-left: 8px; }
html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow .btn-danger.btn-sm { background: var(--cera-bg-grey); color: var(--cera-text-dark); border-bottom-color: var(--cera-border); }
html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow .btn-danger.btn-sm:hover { background: var(--cera-border); color: var(--cera-text-dark); }
html:root #plg_system_webauthn-management-interface [class^="icon-"]::before, html:root #plg_system_webauthn-management-interface [class*=" icon-"]::before { font-family: "Font Awesome 5 Free"; font-weight: 900; font-style: normal; display: inline-block; line-height: 1; }
html:root #plg_system_webauthn-management-interface .icon-edit::before { content: "\f303"; }
html:root #plg_system_webauthn-management-interface .icon-minus::before { content: "\f2ed"; }
html:root #plg_system_webauthn-management-interface .icon-plus::before { content: "\f067"; }
@media (max-width: 575px) { html:root #plg_system_webauthn-management-interface td.webauthnManagementCell { white-space: normal; } html:root #plg_system_webauthn-management-interface .webauthnManagementEditorRow { flex-wrap: wrap; } }

/* Mengenfeld (+/-) einheitlich auf Merkzettel, Produktuebersicht, Produktdetail und Warenkorb */
html:root :is(#cart-view, body) .box-quantity { position: relative !important; display: inline-block !important; width: 100px !important; height: 32px !important; }
html:root :is(#cart-view, body) .box-quantity .quantity-box { display: block !important; position: relative !important; width: 100px !important; height: 32px !important; box-sizing: border-box !important; }
html:root :is(#cart-view, body) .box-quantity .quantity-box input.quantity-input.js-recalculate,
html:root #cart-view .box-bg.basket .box-bg-indent table.cart-summary.vk-cart-list tr td.qnt .box-quantity .quantity-box input.quantity-input.js-recalculate { display: block !important; box-sizing: border-box !important; width: 44px !important; min-width: 0 !important; max-width: none !important; height: 28px !important; margin: 0 auto !important; padding: 0 !important; line-height: 26px !important; text-align: center !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls {
  all: unset; position: absolute !important; top: 5px !important; width: 22px !important; height: 22px !important; margin: 0 !important; padding: 0 !important;
  box-sizing: border-box; display: flex !important; align-items: center; justify-content: center; cursor: pointer; font-size: 9px; line-height: 1; color: var(--cera-blue);
}
html:root :is(#cart-view, body) .box-quantity button.quantity-controls:is(.quantity-plus, .vk-q-plus) { left: 4px !important; right: auto !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls:is(.quantity-minus, .vk-q-minus) { right: 4px !important; left: auto !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls i { display: block; margin: 0 !important; padding: 0; font-size: 9px; line-height: 1; width: auto; height: auto; }

/* ===== Responsive (Handy) ===== */
@media (max-width: 575.98px) and (orientation: portrait) {
  html:root .responsive-tabs .responsive-tabs__panel { padding-left: 10px !important; padding-right: 10px !important; }
}
/* Produktdetail: Bildzoom (ElevateZoom) auf Touch-Geraeten aus, damit Scrollen moeglich bleibt */
@media (max-width: 767.98px), (hover: none) and (pointer: coarse) {
  html:root .zoomContainer, html:root .zoomWindowContainer, html:root .zoomLens { display: none !important; pointer-events: none !important; }
}
/* Kuerzlich angesehene Artikel: Bild links, kompletter Text daneben (zentriert) */
@media (max-width: 575.98px) {
  html:root ul.recentproducts li .box-style { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; align-items: center; align-content: center; text-align: center; padding: 10px; }
  html:root ul.recentproducts li .box-style > .browse { grid-column: 1; grid-row: 1 / span 3; margin: 0; float: none; width: 96px; }
  html:root ul.recentproducts li .box-style > .browse img { width: 96px; height: 96px; object-fit: contain; display: block; }
  html:root ul.recentproducts li .box-style > strong, html:root ul.recentproducts li .box-style > a { grid-column: 2; display: block; margin: 0; }
  html:root ul.recentproducts li .box-style > strong { font-size: 13px; }
  html:root ul.recentproducts li .box-style > i.fa { display: none; }
  html:root ul.recentproducts li .box-style > a:first-of-type::after { content: "\f0a9"; font-family: "Font Awesome 5 Free"; font-weight: 900; margin-left: 6px; font-size: 13px; }
}

/* Frage-zum-Produkt-Popup (fancybox iframe): Rahmen wie Warenkorb-Popup */
html:root .fancybox-wrap.fancybox-type-iframe { position: fixed !important; left: 50% !important; top: 50% !important; width: min(560px, calc(100vw - 20px)) !important; transform: translate(-50%, -50%) !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-skin { padding: 0 !important; margin: 0 !important; background: var(--cera-white, #fff); border: 0; border-top: 3px solid var(--color-primary, var(--cera-blue, #007dc5)); border-radius: 6px; overflow: hidden; box-shadow: rgba(0,0,0,.2) 0 0 5px; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-outer { padding: 0 !important; margin: 0 !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-inner { width: 100% !important; height: min(640px, calc(100vh - 60px)) !important; overflow: hidden !important; }
html:root .fancybox-wrap.fancybox-type-iframe iframe.fancybox-iframe { display: block; width: 100%; height: 100%; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close { top: 15px !important; right: 14px !important; width: 16px; height: 16px; background: none !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close::before { content: "\f00d"; font-family: 'fontawesome'; font-size: 16px; line-height: 16px; color: var(--cera-text-dark, #292f38); }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close::after { content: none !important; }
