/* replica-popup.css — 2026-05-10
 *
 * Modal overlay that opens when an `a.capture-tag.recon` ("standalone replica")
 * link is clicked anywhere on /index.html. Hosts an iframe rendered at a
 * mobile-phone viewport (390x844, iPhone 14 Pro logical pixels) so the
 * destination page renders responsively as if opened on a phone — same
 * visual outcome as F12 → device toolbar, without the actual DevTools API.
 */

.replica-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.replica-popup-overlay.open {
  display: flex;
  opacity: 1;
}

.replica-popup-frame {
  background: #0e1116;
  border: 1px solid #2a3039;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 412px;            /* 390 (phone) + 11px bezel each side */
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  position: relative;
}

.replica-popup-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 12px;
  background: #1b1f26;
  border-bottom: 1px solid #2a3039;
  font: 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  color: #c7d0dc;
}
.replica-popup-chrome__dots {
  display: inline-flex;
  gap: 6px;
}
.replica-popup-chrome__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4d54;
  display: block;
}
.replica-popup-chrome__dots i:nth-child(1) { background: #ff6058; }
.replica-popup-chrome__dots i:nth-child(2) { background: #f3c85d; }
.replica-popup-chrome__dots i:nth-child(3) { background: #2cc640; }

.replica-popup-chrome__title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #9ca8b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.replica-popup-chrome__btn {
  background: transparent;
  border: 1px solid #2a3039;
  color: #c7d0dc;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.replica-popup-chrome__btn:hover {
  background: #232830;
  border-color: #3a4250;
}
.replica-popup-chrome__btn--close {
  padding: 4px 9px;
  font-size: 13px;
  line-height: 1;
}

.replica-popup-device {
  position: relative;
  background: #000;
  padding: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.replica-popup-device__notch {
  width: 110px;
  height: 22px;
  background: #000;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.replica-popup-iframe {
  width: 390px;
  height: 844px;
  max-height: calc(100vh - 48px - 36px - 22px);
  border: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: block;
}

/* Landscape rotation: swap the device + iframe dimensions. */
.replica-popup-frame.landscape {
  width: 866px;
}
.replica-popup-frame.landscape .replica-popup-iframe {
  width: 844px;
  height: 390px;
  max-height: calc(100vh - 48px - 36px);
}
.replica-popup-frame.landscape .replica-popup-device__notch {
  display: none;
}

@media (max-width: 460px) {
  .replica-popup-frame {
    width: 100%;
    border-radius: 14px;
  }
  .replica-popup-iframe {
    width: 100%;
    max-width: 100%;
  }
}
