@import url('./coffee-backgrounds.css');

.coffee-object {
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  height: min(68svh, 700px);
  overflow: hidden;
  color: #1b392b;
}
.coffee-object > canvas, .coffee-object > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.coffee-player-page { margin: 0; background: #25392e; font: 1rem/1.4 system-ui, sans-serif; }
.coffee-object.coffee-object-standalone {
  height: 100svh;
  background: var(--coffee-background-moka);
}
.coffee-object.coffee-object-standalone > canvas { touch-action: none !important; }
.coffee-object.coffee-object-standalone > img {
  box-sizing: border-box;
  padding: 8vh 5vw;
  mask-image: none;
  mix-blend-mode: normal;
}
.coffee-object > img {
  object-fit: contain;
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse 72% 72% at center, black 55%, transparent 95%);
}
.coffee-object > canvas { display: block; cursor: grab; touch-action: pan-y !important; }
.coffee-object > .co-outline {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
  padding: min(6svh, 38px) 5%; color: #35554b;
  transition: opacity 240ms ease;
}
.co-outline path { fill: none; stroke: currentColor; stroke-width: 1.05; stroke-linecap: round;
  stroke-dasharray: 32 380; animation: co-trace .65s ease-out var(--t) both; }
@keyframes co-trace { from { stroke-dashoffset: 32; opacity: 0 } to { stroke-dasharray: 420 0; stroke-dashoffset: 0; opacity: .83 } }
.co-outline path.co-silhouette {stroke-width:1.5;stroke-dasharray:1;animation:co-perimeter 1.05s ease-out both}
@keyframes co-perimeter {from{stroke-dashoffset:1;opacity:.2}to{stroke-dashoffset:0;opacity:.92}}
.coffee-object:has(> .co-outline):not(.co-painted) > :is(canvas,button),
.coffee-object:has(> .moka-wire):not(.co-painted) > :is(canvas,button,.co-poster),
.coffee-object > .co-outline ~ .co-poster { visibility: hidden; }
.coffee-object.co-painted > .co-outline { opacity: 0; }
.co-first-view {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
.co-first-view img { width: 100%; height: 100%; object-fit: contain; }
.coffee-object:not(.co-painted) > .co-first-view.co-loaded {
  animation: co-show-first 160ms ease-out 680ms forwards;
}
.coffee-object:not(.co-painted):has(> .co-first-view.co-loaded) > :is(.co-outline,.moka-wire) {
  animation: co-hide-trace 160ms ease-out 680ms forwards;
}
.coffee-object.co-painted > .co-first-view { display: none; }
@keyframes co-show-first { to { opacity: 1; } }
@keyframes co-hide-trace { to { opacity: 0; } }
@media(prefers-reduced-motion:reduce){
  .coffee-object:not(.co-painted) > .co-first-view.co-loaded { animation:none;opacity:1; }
  .coffee-object:not(.co-painted):has(> .co-first-view.co-loaded) > :is(.co-outline,.moka-wire) { animation:none;opacity:0; }
}
@media(prefers-reduced-motion:reduce){.coffee-object > .co-outline{transition:none}.co-outline path,.co-outline path.co-silhouette{animation:none;stroke-dasharray:none}}
.coffee-object > canvas:active { cursor: grabbing; }
.coffee-object [hidden], .coffee-object[hidden] { display: none !important; }
.coffee-object button { font: inherit; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
.coffee-object :focus-visible { outline: 2px solid #355c42; outline-offset: -2px; }
.coffee-object .co-control {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  height: 44px;
  width: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #32544366;
  background: #f7faedeb;
  box-shadow: 0 1px 4px #1f392719;
}
.co-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.co-control.co-full { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.co-control.co-play { bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); }
.co-play svg { fill: currentColor; stroke: none; }
.coffee-object .co-pin {
  position: absolute;
  inset: 0 auto auto 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.co-pin::before {
  content: '+';
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #28402f;
  font: 500 16px/1 system-ui, sans-serif;
  background: #f4f7dd;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #f3f8d950, 0 1px 5px #14231c66;
}
.co-pin[aria-pressed="true"]::before { content: '−'; color: white; background: #2b513c; }
.co-pin:hover::before { box-shadow: 0 0 0 6px #f3f8d955, 0 1px 5px #14231c66; }
.coffee-object .hotspot {
  position: absolute;
  z-index: 2;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
}
.coffee-object .hotspot span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #f1f5d7;
  color: #243b2a;
  box-shadow: 0 0 0 5px #f3f8d940, 0 1px 7px #14231c55;
}
.coffee-object .hotspot span::before, .coffee-object .hotspot span::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
}
.coffee-object .hotspot span::after { transform: rotate(90deg); }
.coffee-object .hotspot.returning span::after { display: none; }
.coffee-object .co-moka-ar {
  position: absolute;
  z-index: 3;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: calc(max(12px, env(safe-area-inset-right)) + 54px);
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #32544366;
  border-radius: 22px;
  background: #f7faedeb;
}
.coffee-object[data-film] .co-moka-ar { display: none; }
.coffee-object .co-fallback {
  position: absolute;
  z-index: 2;
  color: #24382c;
  border: 1px solid #576e503b;
  border-radius: 10px;
  background: #f9faef;
  box-shadow: 0 3px 15px #21372815;
  font: 400 .94rem/1.35 system-ui, sans-serif;
}
.co-fallback { bottom: 12px; left: 50%; transform: translateX(-50%); max-width: 88%; padding: 7px 12px; text-align: center; }
.co-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.coffee-object.co-expanded {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
}
.coffee-object.co-expanded, .coffee-object:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  background: radial-gradient(ellipse at 45% 36%, #fafbf7, #e7ece7);
}
.coffee-object.co-expanded > canvas, .coffee-object:fullscreen > canvas { touch-action: none !important; }
html:has(.coffee-object.co-expanded) { overflow: hidden; }
@media(max-width: 650px) {
  .coffee-object { height: min(97vw, 52svh, 450px); }
}
