/*
 * Bunny Video for Bricks — element styles.
 * Scoped to .brxe-bunny-video (Bricks auto-prefixes brxe-{name}).
 */

.brxe-bunny-video {
  position: relative;
  width: 100%;
}

/* Unframed embed: iframe takes the chosen aspect ratio */
.brxe-bunny-video:not(.has-frame) iframe {
  display: block;
  width: 100%;
  aspect-ratio: var(--bunny-ar, 16 / 9);
  border: 0;
}

/* Unframed background: fill a root you size via Bricks height/min-height */
.brxe-bunny-video.is-background:not(.has-frame) {
  overflow: hidden;
}

.brxe-bunny-video.is-background:not(.has-frame) .bunny-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Device frame: phone --- */
.brxe-bunny-video.has-frame {
  display: block;
}

.bunny-frame {
  --_bezel: clamp(8px, 3.2%, 14px);
  --_radius: clamp(30px, 12%, 52px);
  position: relative;
  width: 100%;
  max-width: var(--bunny-frame-width, 300px);
  margin-inline: auto;
  aspect-ratio: 9 / 19.5;
  padding: var(--_bezel);
  background: var(--bunny-frame-color, #1c1330);
  border-radius: var(--_radius);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.45);
}

.bunny-frame__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  border-radius: calc(var(--_radius) - var(--_bezel));
}

.bunny-frame__screen iframe,
.bunny-frame__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Notch */
.bunny-frame::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: var(--_bezel);
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: clamp(14px, 4%, 22px);
  background: var(--bunny-frame-color, #1c1330);
  border-radius: 0 0 14px 14px;
}

/* Home indicator */
.bunny-frame::after {
  content: "";
  position: absolute;
  z-index: 4;
  bottom: calc(var(--_bezel) + 7px);
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
}

/* Status bar (time + signal / wifi / battery), split by the notch */
.bunny-frame__status {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: clamp(24px, 8.5%, 36px);
  padding: 0 clamp(11px, 6.5%, 22px);
  color: var(--bunny-status-color, #fff);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: clamp(9px, 3.7%, 13px);
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.bunny-frame__time {
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}

.bunny-frame__icons {
  display: inline-flex;
  align-items: center;
  gap: clamp(3px, 1.7%, 6px);
}

.bunny-frame__icons .sb-ic {
  display: block;
  width: auto;
  height: clamp(9px, 3.4%, 12px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.28));
}

.bunny-frame__icons .sb-battery {
  height: clamp(9px, 3.2%, 11px);
}
