/* The panorama supplies the jambs and the room behind these two glass leaves. */
.doorway {
  position: absolute;
  z-index: 3;
  top: var(--door-y, 0);
  left: var(--door-x, 0);
  width: var(--door-w, 0);
  height: var(--door-h, 0);
  display: block;
  container-type: inline-size;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff1cc;
  text-decoration: none;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.venue[data-active="true"] .doorway[href] {
  pointer-events: auto;
  cursor: pointer;
}

.doorway:focus-visible {
  outline: 2px solid var(--accent, #e8bb73);
  outline-offset: 3px;
}

.door-leaves,
.door-label {
  position: absolute;
  pointer-events: none;
}

.door-leaves {
  inset: 0;
  display: flex;
  perspective: 380px;
  perspective-origin: center 46%;
}

.door-leaf {
  position: relative;
  display: block;
  flex: 0 0 50%;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid var(--metal, #a97843);
  border-top-color: color-mix(in srgb, var(--metal, #c29354) 70%, #fff1c6);
  border-right-color: color-mix(in srgb, var(--metal, #a97843) 60%, #28150c);
  border-bottom-color: #50301d;
  background:
    linear-gradient(122deg, #fff1d721 0%, transparent 24% 49%, #ffe5a21a 57%, transparent 76%),
    linear-gradient(180deg, #291a23bc, #16111bef 53%, #130e15cb 78%, #1e1414f5);
  box-shadow:
    inset 0 0 0 1px #241408,
    inset 0 0 0 3px #deaa6840,
    inset 0 -8px 14px #090609a8;
  backface-visibility: hidden;
  transition: transform 520ms cubic-bezier(.23, .68, .28, 1);
}

.door-leaf.left { transform-origin: left center; }
.door-leaf.right {
  transform-origin: right center;
  border-left-color: #48281b;
}

/* Thin brass mullions, dark kickplates and a narrow reflected light streak in the glass. */
.door-leaf::before {
  content: "";
  position: absolute;
  inset: 5% 6%;
  border: 1px solid #e0a8685c;
  background:
    linear-gradient(90deg, transparent 46%, #b3835445 49% 51%, transparent 54%),
    linear-gradient(180deg, transparent 17%, #be956356 18% 19%, transparent 20% 70%, #d3995f64 71% 72%, #261816bf 73% 100%),
    linear-gradient(111deg, transparent 10% 37%, #ffe6b216 41%, transparent 57%);
}

/* Pull bars stay attached to the individual leaves as they swing on their hinges. */
.door-leaf::after {
  content: "";
  position: absolute;
  top: 53%;
  width: 5%;
  min-width: 2px;
  height: 24%;
  border-radius: 2px;
  background: linear-gradient(90deg, #6c4228, #f7d49b 42%, #ad7343 75%, #57341f);
  box-shadow: 1px 1px 3px #060306da;
}

.door-leaf.left::after { right: 13%; }
.door-leaf.right::after { left: 13%; }

.door-label {
  z-index: 1;
  inset-inline: 0;
  top: 42%;
  margin: 0;
  color: #fff0c8;
  font: 700 clamp(11px, 11cqw, 23px)/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .19em;
  text-align: center;
  text-indent: .19em;
  white-space: nowrap;
  text-shadow: 0 1px 2px #160b05, 0 0 8px #dca35c8a;
  transition: opacity 180ms ease, transform 270ms ease;
}

.venue[data-active="true"][data-open="true"] .doorway[href] .door-leaf.left {
  transform: rotateY(83deg);
}

.venue[data-active="true"][data-open="true"] .doorway[href] .door-leaf.right {
  transform: rotateY(-83deg);
}

.venue[data-active="true"][data-open="true"] .doorway[href] .door-label {
  opacity: 0;
  transform: translateY(3px) scale(.91);
}

.doorway:not([href]) .door-label { color: #e2c99f; }

.venue[data-venue="tonplay"] .door-label {
  font-variant: small-caps;
  letter-spacing: .08em;
}

/* Cast brass call button mounted on the pier between the door and the bonus box. */
.bot-entry {
  position: absolute;
  left: calc(var(--door-x) + var(--door-w) + 12px);
  bottom: calc(100% - var(--wall-y) + 8px);
  width: 111px;
  height: 66px;
  z-index: 2;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 2px solid #bc9359;
  border-radius: 3px;
  background:
    radial-gradient(circle at 4px 4px, #f2d5a1 .8px, #524231 1.4px, transparent 2px),
    radial-gradient(circle at calc(100% - 4px) calc(100% - 4px), #eaca8f .8px, #4f3725 1.4px, transparent 2px),
    linear-gradient(125deg,#244c46,#122d29 54%,#192e26);
  color: #fff0c6;
  box-shadow: inset 0 0 0 1px #392d1c, inset 0 0 0 2px #af935b, 1px 3px 4px #130f09db;
  text-decoration: none;
  touch-action: manipulation;
}
.bot-entry[inert] { pointer-events: none; }
.bot-entry:not([inert]) { pointer-events: auto; }
.bot-seal {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #cdb580;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%,#499481,#174f48 65%,#102b28);
  box-shadow: 0 0 5px #7dd7c65e;
}
.bot-seal::after {
  content: "";
  width: 15px;
  height: 14px;
  background: #e9ffed;
  clip-path: polygon(0 45%,100% 0,82% 96%,50% 68%,77% 29%,39% 60%);
}
.bot-caption { display: grid; gap: 2px; font: bold 15px/1 Georgia,serif; }
.bot-caption small { font: 600 8px/1.2 "Segoe UI",sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.bot-entry:is(:hover,:focus-visible):not([inert]) {
  border-color: #ffe0a1;
  box-shadow: inset 0 0 0 1px #493d26, inset 0 0 10px #7af6cb66, 0 0 9px #8be5cf99;
}

@media (prefers-reduced-motion: reduce) {
  .door-leaf,
  .door-label { transition: none; }
}
