/* ===================================================================
   Hibrid Watermark – overlay badge on featured images
   ===================================================================

   Structure:
     <figure class="hibrid-wm-wrap">
         <img …>
         <mark class="hibrid-watermark hibrid-wm--sm">Label</mark>
     </figure>

   The watermark colour is set via  --wm-color  CSS custom property.
   =================================================================== */

/* ── Wrapper: positioned container ────────────────────────── */
.hibrid-wm-wrap {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0; /* collapse whitespace around img */
}

.hibrid-wm-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Badge base ───────────────────────────────────────────── */
.hibrid-watermark {
  /* Reset <mark> defaults — tinted by watermark color */
  background-color: color-mix(in srgb, var(--wm-color, #ffffff) 14%, transparent);
  color: var(--wm-color, #ffffff);

  /* Position: top-right, 4px from image edges */
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;

  /* Box model */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 0;

  /* Typography */
  font-family:
    "Digital Regular",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;

  word-spacing: 0.05em;

  /* Prevent interaction / selection */
  pointer-events: none;
  user-select: none;
}

.hibrid-watermark__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.hibrid-watermark__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.hibrid-wm--lg .hibrid-watermark__icon svg {
  width: 22px;
  height: 22px;
}

/* ── Size: small (listings, category, index, sidebar) ─────── */
.hibrid-wm--sm {
  /* Slightly more padding on top than bottom to nudge text down visually */
  padding: 1.5px 10px;
}

/* ── Size: large (single.php featured image) ──────────────── */
.hibrid-wm--lg {
  font-size: clamp(18px, 2.5vw, 28px);
  /* Same idea for large badge: a touch more top padding */
  padding: 3px 16px;
  min-width: 25%;
  text-align: center;
}

/* ── Responsive tweaks (larger on mobile for readability) ──── */
@media (max-width: 768px) {
  .hibrid-wm--lg {
    font-size: clamp(20px, 4.5vw, 28px);
    padding: 4px 18px;
    min-width: 28%;
  }
  .hibrid-wm--sm {
    font-size: clamp(14px, 3.2vw, 18px);
    padding: 2px 12px;
  }
}

@media (max-width: 480px) {
  .hibrid-wm--lg {
    font-size: clamp(18px, 5vw, 24px);
    padding: 4px 16px;
    min-width: 30%;
  }
  .hibrid-wm--sm {
    font-size: clamp(13px, 4vw, 16px);
    padding: 2px 10px;
  }
}
