/* hm-garan.css — EU GARAN label and legal-guarantee notice (homemart.bg). Source: site_ui/garan-label/ */

/* Product page block: right after the Postbank cards (order 21, CHANGELOG 62) */
#product.product-details > .hm-garan { order: 22; }
.hm-garan { margin-top: 12px; width: 100%; container-type: inline-size; }

/* One card for all three states: GARAN label / brand note / legal-guarantee reminder.
   Radius matches the Postbank buttons above. */
.hm-garan-card {
  display: flex; align-items: center; gap: 14px; box-sizing: border-box; width: 100%;
  margin: 0; padding: 9px 16px; text-align: left;
  background: #f4f5fc; border: 1px solid #e2e5f4; border-radius: 12px;
  color: #231f20; font: inherit;
}
.hm-garan-card-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hm-garan-card-title { margin: 0; font-size: 14px; line-height: 1.3; font-weight: 700; color: #1d2a5c; }
.hm-garan-card-text { margin: 0; font-size: 12.5px; line-height: 1.45; color: #3d3f4a; }
.hm-garan-card-more { color: #1d3c8f; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.hm-garan-card-more::after { content: " \203A"; }
a.hm-garan-card-more:hover { text-decoration: none; }

/* GARAN state: the whole card opens the full label */
/* Label only, no frame: the clickable label sits at the right edge of the column. */
.hm-garan-badge { width: fit-content; max-width: 100%; margin-left: auto; padding: 4px 0; cursor: pointer; background: transparent; border: 0; border-radius: 4px; transition: opacity .15s; }
.hm-garan-badge:hover { opacity: .8; }
.hm-garan-badge:focus-visible { outline: 2px solid #1d3c8f; outline-offset: 2px; }
.hm-garan-badge-img { display: block; flex: 0 0 auto; height: 32px; width: auto; margin: 0 !important; }
.hm-garan-badge .hm-garan-card-body { padding-left: 14px; border-left: 1px solid #e2e5f4; }

/* No-GARAN state */
.hm-garan-info-icon { display: block; flex: 0 0 auto; width: 30px; height: 30px; color: #1d3c8f; }

.hm-garan-print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; visibility: hidden; }

/* Modal */
html.hm-garan-open, html.hm-garan-open body { overflow: hidden; }
.hm-garan-modal {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 0, .55);
}
.hm-garan-dialog {
  position: relative; box-sizing: border-box; width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px); overflow: auto; padding: 20px 20px 16px;
  background: #fff; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  color: #231f20; font-size: 14px; line-height: 1.5;
}
.hm-garan-dialog--notice { max-width: 720px; }
.hm-garan-title { margin: 0 40px 12px 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.hm-garan-close {
  position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; padding: 0;
  border: 0; background: none; font-size: 30px; line-height: 40px; color: #231f20; cursor: pointer;
}
.hm-garan-close:focus-visible, .hm-garan-print:focus-visible { outline: 2px solid #034ea2; outline-offset: 2px; }
.hm-garan-print {
  margin: 0 0 10px; padding: 5px 10px; border: 0; border-radius: 2px;
  background: #231f20; color: #fff; font-size: 13px; cursor: pointer;
}
.hm-garan-print[disabled] { opacity: .5; cursor: default; }
.hm-garan-label svg { display: block; width: 100%; height: auto; }
.hm-garan-notice-img { display: block; width: 100%; height: auto; }
.hm-garan-more { margin: 12px 0 0; font-size: 13px; }
.hm-garan-more a { color: #034ea2; text-decoration: underline; }
.hm-garan-footer-fallback { padding: 8px 16px; text-align: center; font-size: 13px; }

/* Narrow product column: label above the text */
@container (max-width: 430px) {
  .hm-garan-badge-img { height: 28px; }
}
@media (max-width: 480px) {
  .hm-garan-card { gap: 12px; padding: 9px 12px; }
  .hm-garan-badge { padding: 4px 0; }
  .hm-garan-info-icon { width: 28px; height: 28px; }
  .hm-garan-card-title { font-size: 13.5px; }
  .hm-garan-card-text { font-size: 12.5px; }
  .hm-garan-dialog { padding: 16px 14px 12px; }
}
