/* Layout hooks apply only when the event entry is present. */
.haptelle-event-slot { display: flex; justify-content: center; flex: 0 0 100%; order: 5; padding: 10px 0 12px; }
.haptelle-event-drag-handle { display: none; }
.haptelle-header-event { position: relative; isolation: isolate; display: flex; align-items: center; width: 350px; max-width: 100%; height: 52px; padding: 0 12px 0 0; border: 1px solid #dda75f; border-radius: 999px; background: linear-gradient(120deg,#2b180c,#1b1009 70%); color: #fff1ce; box-shadow: inset 0 0 9px #dda75f30,0 0 12px #dda75f28; transition: filter .2s,transform .2s; }
.haptelle-header-event:hover { color: #fff1ce; filter: brightness(1.12); transform: translateY(-1px); }
.haptelle-header-event:focus-visible { outline: 3px solid #ffe1a3; outline-offset: 4px; }
.haptelle-event-art { flex: 0 0 150px; width: 150px; height: 72px; max-width: none; object-fit: contain; position: relative; z-index: 1; pointer-events: none; }
.haptelle-event-clock { display: flex; justify-content: center; align-items: center; flex: 1; min-width: 0; height: 28px; border-left: 1px solid #dda75f99; padding-left: 10px; font-family: inherit; font-size: 16px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff1ce; }
.haptelle-event-glow,.haptelle-event-sheen { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; }
.haptelle-event-glow { border: 1px solid #ffe1a3; box-shadow: 0 0 10px #dda75f66; animation: haptelle-event-breathe 5s ease-in-out infinite; }
.haptelle-event-sheen { overflow: hidden; }
.haptelle-event-sheen::before { content: ''; position: absolute; inset: 0; width: 22%; background: linear-gradient(110deg,transparent,#ffe1a345,transparent); transform: translateX(-200%) skewX(-20deg); animation: haptelle-event-sweep 9s ease-in-out infinite; }
.haptelle-event-star { position: absolute; width: 13px; height: 13px; background: #ffe1a3; clip-path: polygon(50% 0,59% 40%,100% 50%,59% 59%,50% 100%,41% 59%,0 50%,41% 40%); pointer-events: none; animation: haptelle-event-twinkle 6s ease-in-out infinite; }
.haptelle-event-star-one { left: 18px; bottom: -5px; }
.haptelle-event-star-two { left: 60%; top: -6px; animation-delay: -2s; width: 10px; height: 10px; }
.haptelle-event-star-three { right: 8px; bottom: 4px; animation-delay: -4s; }
@keyframes haptelle-event-breathe { 0%,100% { opacity: .25; } 50% { opacity: .7; } }
@keyframes haptelle-event-sweep { 0%,65% { transform: translateX(-200%) skewX(-20deg); opacity: 0; } 70% { opacity: .7; } 90%,100% { transform: translateX(550%) skewX(-20deg); opacity: 0; } }
@keyframes haptelle-event-twinkle { 0%,100% { opacity: .2; transform: scale(.7); } 50% { opacity: .85; transform: scale(1); } }
@media(min-width:1024px) {
 .haptelle-has-header-event .header-inner { gap: 8px; flex-wrap: nowrap; }
 .haptelle-has-header-event .header-inner .header-left,.haptelle-has-header-event .header-inner .header-right { flex: 0 0 auto; }
 .haptelle-has-header-event .header-center { flex: 1 1 auto; min-width: 0; margin-left: auto; margin-right: auto; }
 .haptelle-event-slot { flex: 0 0 auto; order: 0; padding: 0; }
 .haptelle-header-event { width: 230px; height: 44px; padding-right: 10px; }
 .haptelle-event-art { flex-basis: 90px; width: 90px; height: 44px; }
 .haptelle-event-clock { font-size: 12px; padding-left: 6px; }
}
@media(max-width:767px) {
 .haptelle-event-slot { padding: 4px 0 6px; }
 .haptelle-header-event { width: 260px; height: 48px; }
 .haptelle-event-art { flex-basis: 140px; width: 140px; height: 67px; }
 .haptelle-event-clock { font-size: 15px; }
}
@media(prefers-reduced-motion:reduce) {
 .haptelle-header-event,.haptelle-event-glow,.haptelle-event-star,.haptelle-event-sheen::before { animation: none; transition: none; }
 .haptelle-event-sheen { display: none; }
 .haptelle-event-glow { opacity: .3; }
 .haptelle-header-event:hover { transform: none; }
}

/* Preserve all desktop labels/actions at the tight end of the existing menu breakpoint. */
@media(min-width:1200px) and (max-width:1365px) {
 .haptelle-has-header-event .header-inner { gap: 6px; }
 .haptelle-has-header-event .box-nav-menu { gap: clamp(10px, 0.95vw, 13px) !important; }
 .haptelle-has-header-event .box-nav-menu > .menu-item > .item-link { white-space: nowrap; }
 .haptelle-has-header-event .nav-icon-list { gap: 12px; }
}
@media(min-width:1366px) and (max-width:1599px) {
 .haptelle-has-header-event .header-inner { gap: clamp(6px, .5vw, 8px); }
 .haptelle-has-header-event .box-nav-menu { gap: clamp(14px, 1.05vw, 17px) !important; }
 .haptelle-has-header-event .nav-icon-list { gap: clamp(14px, 1.1vw, 18px); }
}
@media(min-width:1024px) and (max-width:1199px) {
 .haptelle-has-header-event .box-open-menu-mobile { flex: 0 0 auto; }
 .haptelle-has-header-event .header-left { margin-right: auto; }
}

.haptelle-event-slot[hidden] { display: none; }
.haptelle-header-event:not(a):hover { transform: none; filter: none; }
.haptelle-event-name { min-width: 0; max-width: 95px; font-size: 12px; line-height: 1.15; overflow-wrap: anywhere; color: #fff1ce; }
.haptelle-header-event:has(.haptelle-event-name) { height: auto; min-height: 44px; padding-top: 5px; padding-bottom: 5px; }
.haptelle-header-event:has(.haptelle-event-name) .haptelle-event-art { flex-basis: 64px; width: 64px; height: 44px; }
.haptelle-header-event:has(.haptelle-event-name) .haptelle-event-clock { flex: 0 0 auto; margin-left: auto; }
.haptelle-event-no-clock { width: auto; min-width: 100px; padding-right: 12px; }
.haptelle-event-no-clock .haptelle-event-name { max-width: 170px; }
.haptelle-event-no-image { padding-left: 16px; }
.haptelle-event-no-image .haptelle-event-clock:first-of-type { border-left: 0; }
.haptelle-event-no-image:not(:has(.haptelle-event-name)) .haptelle-event-clock { border-left: 0; padding-left: 0; }

:root {
 --haptelle-event-safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (width < 1920px) {
 .haptelle-event-slot.haptelle-event-floating {
  position: fixed !important;
  z-index: 40;
  top: var(--haptelle-event-top, 0px);
  right: 0;
  left: auto;
  display: block !important;
  flex: none;
  order: initial;
  width: var(--haptelle-event-peek-width, 150px);
  max-width: 100vw;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 0;
  box-sizing: border-box;
  transition: width 270ms cubic-bezier(.22,.7,.2,1);
  will-change: width;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
 }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-edge-right {
  right: 0;
  left: auto;
 }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-expanded {
  width: min(var(--haptelle-event-full-width, 230px), 100vw);
 }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-pointer-down {
  width: var(--haptelle-event-pointer-width, var(--haptelle-event-peek-width, 150px));
  transition: none;
  cursor: grabbing;
 }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-pointer-down .haptelle-header-event,
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-pointer-down .haptelle-event-drag-handle { cursor: grabbing; }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-pointer-down .haptelle-header-event { transform: none; filter: none; }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-dragging {
  width: min(var(--haptelle-event-full-width, 230px), 100vw);
  transition: none;
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event {
  flex: 0 0 var(--haptelle-event-full-width, 230px);
  width: var(--haptelle-event-full-width, 230px);
  max-width: none;
  margin: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event.haptelle-event-artwork {
  top: var(--haptelle-event-art-top-offset, 0px);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-event-artwork .haptelle-event-clock {
  font-size: var(--haptelle-event-art-clock-size, 13px);
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-event-drag-handle {
  display: none;
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event:hover { transform: none; filter: none; }
 .haptelle-event-slot.haptelle-event-floating .haptelle-event-drag-handle { pointer-events: none; }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-dragging .haptelle-header-event { cursor: grabbing; }
 .haptelle-event-slot.haptelle-event-floating:has(.haptelle-header-event:focus-visible) { box-shadow: 0 0 0 3px #ffe1a3; }
 .haptelle-event-slot.haptelle-event-measuring,
 .haptelle-event-slot.haptelle-event-measuring * { visibility: hidden !important; transition: none !important; }
}

@media (min-width: 1024px) and (width < 1920px) {
 .haptelle-event-slot.haptelle-event-floating:not(.haptelle-event-expanded) .haptelle-event-clock {
  display: none !important;
  visibility: hidden !important;
  border: 0 !important;
  padding: 0 !important;
 }
}

@media (width < 1024px) {
 .haptelle-event-slot.haptelle-event-floating,
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-pointer-down {
  z-index: 101;
  width: min(var(--haptelle-event-full-width, 230px), 100vw);
  transition: none;
 }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-edge-left { left: 0; right: auto; }
 .haptelle-event-slot.haptelle-event-floating.haptelle-event-behind-header { z-index: 40; }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event.haptelle-event-artwork {
  top: 0;
  clip-path: none;
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event:not(.haptelle-event-artwork) .haptelle-event-art {
  flex-basis: var(--haptelle-event-icon-width, 90px);
  width: var(--haptelle-event-icon-width, 90px);
  height: var(--haptelle-event-icon-height, 44px);
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event:not(.haptelle-event-artwork):has(.haptelle-event-name) .haptelle-event-art {
  flex-basis: var(--haptelle-event-icon-name-width, 64px);
  width: var(--haptelle-event-icon-name-width, 64px);
 }
 .haptelle-event-slot.haptelle-event-floating .haptelle-header-event:not(.haptelle-event-artwork) .haptelle-event-clock {
  font-size: var(--haptelle-event-icon-clock-size, 12px);
  padding-left: 6px;
 }
}

/* Keep the existing artwork flex item while picture selects the mobile source. */
.haptelle-event-picture { display: contents; }

/* Complete artwork supplies its own gift, title and frame; the clock stays HTML. */
.haptelle-header-event.haptelle-event-artwork { --haptelle-event-artwork-peek-edge: 46%; display: block; width: 350px; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.haptelle-event-artwork .haptelle-event-art { display: block; width: 100%; max-width: 100%; height: auto; }
.haptelle-event-artwork .haptelle-event-clock { position: absolute; z-index: 2; top: 50%; left: var(--haptelle-event-artwork-peek-edge); right: 5%; transform: translateY(-50%); height: auto; padding: 0; border: 0; font-size: 13px; line-height: 1; color: #ffe7b0; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.haptelle-event-artwork .haptelle-event-glow, .haptelle-event-artwork .haptelle-event-star { display: none; }
.haptelle-event-artwork .haptelle-event-sheen { inset: 27% 3% 15%; border-radius: 999px; }
@media (min-width: 1024px) {
 .haptelle-header-event.haptelle-event-artwork { width: 230px; }
 .haptelle-event-artwork .haptelle-event-clock { font-size: 13px; }
}
@media (max-width: 767px) {
 .haptelle-header-event.haptelle-event-artwork { width: 230px; }
 /* The pill's visual center sits just below the artwork canvas midpoint. */
 .haptelle-event-artwork .haptelle-event-clock { font-size: 13px; top: 51.8%; }
}
/* This artwork's pill is lower within its transparent canvas. */
.haptelle-event-artwork:has(.haptelle-event-art[src*="/wp-content/uploads/2026/11/icon.png"]) .haptelle-event-clock { top: 55.1%; }
@media (min-width: 768px) and (max-width: 1023px) {
 .haptelle-header-event.haptelle-event-artwork { width: 230px; }
}

/* Mobile: the complete artwork PNG (2172x724) ships transparent bands above and below the
   visible banner (opaque band spans y 160..557). Crop those bands and give the layout its
   space back, so the header no longer reserves blank space around the banner. The visible
   artwork keeps its rendered size and the clock keeps its anchor-relative percentage top;
   the anchor box itself is unchanged, only its clipped and outer (margin) height shrink. */
@media (min-width: 360px) and (max-width: 767px) {
 .haptelle-event-slot { padding: 10px 0; }
 .haptelle-header-event.haptelle-event-artwork {
  margin-top: -16.94px;
  margin-bottom: -17.58px;
  clip-path: inset(22.10% 0 22.93% 0);
 }
}

@media (prefers-reduced-motion: reduce) {
 .haptelle-event-slot.haptelle-event-floating { transition: none; will-change: auto; }
}
