.bv-native-sheet-page-manager {
  position: fixed;
  left: 18px;
  top: 50%;
  z-index: 10020;
  display: none;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: translateY(-50%);
  pointer-events: none;
}

body.bv-native-sheet-active .bv-native-sheet-page-manager.is-ready {
  display: block;
  pointer-events: auto;
}

.bv-native-sheet-share-launcher {
  pointer-events: auto;
}

.bv-native-sheet-share-modal[hidden] { display: none !important; }

.bv-native-sheet-share-modal {
  position: fixed;
  inset: 0;
  z-index: 26000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 28, 49, .54);
  backdrop-filter: blur(2px);
}

.bv-native-sheet-share-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 34px));
  overflow: auto;
  padding: clamp(24px, 5vw, 42px);
  border: 4px solid #121c31;
  border-radius: 12px;
  color: #121c31;
  background: #fffdf7;
  box-shadow: 14px 16px 0 #263e72;
}

.bv-native-sheet-share-kicker {
  color: #3156d9;
  font: 700 10px "Courier New", monospace;
  letter-spacing: .16em;
}

.bv-native-sheet-share-dialog h2 {
  margin: 8px 48px 8px 0;
  font: 700 clamp(23px, 4vw, 32px) Georgia, serif;
}

.bv-native-sheet-share-dialog > p {
  margin: 0 0 22px;
  font: 17px/1.5 Georgia, serif;
}

.bv-native-sheet-share-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 3px solid #121c31;
  border-radius: 8px;
  color: #121c31;
  background: white;
  font: 700 28px/1 sans-serif;
  cursor: pointer;
  box-shadow: 4px 5px 0 #121c31;
}

.bv-native-sheet-share-dialog fieldset {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 16px;
  border: 2px solid #121c31;
  border-radius: 8px;
  background: #f2eee2;
}

.bv-native-sheet-share-dialog legend,
.bv-native-sheet-share-result > label {
  padding: 0 6px;
  font: 700 11px "Courier New", monospace;
  letter-spacing: .08em;
}

.bv-native-sheet-share-expiry-option {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 2px solid #a8afbd;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f8f6f0);
  box-shadow: 0 2px 0 rgba(18, 28, 49, .12);
  font: 700 12px "Courier New", monospace;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.bv-native-sheet-share-expiry-option:hover {
  border-color: #66728c;
  transform: translateY(-1px);
}

.bv-native-sheet-share-expiry-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bv-native-sheet-share-expiry-check {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border: 2px solid #7e8798;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 2px 2px 0 rgba(18, 28, 49, .16);
}

.bv-native-sheet-share-expiry-check::after {
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform 110ms ease;
}

.bv-native-sheet-share-expiry-option:has(input:checked) {
  border-color: #3156d9;
  color: #17328d;
  background: linear-gradient(180deg, #eef2ff, #dfe7ff);
  box-shadow: 0 3px 0 rgba(49, 86, 217, .22);
}

.bv-native-sheet-share-expiry-option:has(input:checked) .bv-native-sheet-share-expiry-check {
  border-color: #3156d9;
  background: #3156d9;
  box-shadow: 2px 2px 0 rgba(23, 50, 141, .28);
}

.bv-native-sheet-share-expiry-option:has(input:checked) .bv-native-sheet-share-expiry-check::after {
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.bv-native-sheet-share-expiry-option:has(input:focus-visible) {
  outline: 3px solid #9db0ff;
  outline-offset: 2px;
}

.bv-native-sheet-share-status {
  min-height: 24px;
  margin: 16px 0 10px;
  font: 700 12px/1.4 "Courier New", monospace;
}
.bv-native-sheet-share-status[data-tone="error"] { color: #9a2032; }
.bv-native-sheet-share-status[data-tone="success"] { color: #08715f; }
.bv-native-sheet-share-status[data-tone="working"] { color: #3156d9; }

.bv-native-sheet-share-result {
  margin: 12px 0 18px;
  padding: 16px;
  border: 2px solid #121c31;
  border-radius: 8px;
  background: #e8f5ef;
}

.bv-native-sheet-share-result input {
  width: 100%;
  height: 46px;
  margin: 7px 0;
  padding: 0 11px;
  border: 2px solid #121c31;
  border-radius: 6px;
  background: white;
  font: 13px "Courier New", monospace;
}

.bv-native-sheet-share-expiry { margin-bottom: 12px; font: 700 11px "Courier New", monospace; }
.bv-native-sheet-share-result-actions,
.bv-native-sheet-share-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.bv-native-sheet-share-actions { justify-content: flex-end; margin-top: 18px; }

.bv-native-sheet-share-dialog button:not(.bv-native-sheet-share-close) {
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid #121c31;
  border-radius: 7px;
  color: #121c31;
  background: white;
  font: 700 11px "Courier New", monospace;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 4px 5px 0 #121c31;
}

.bv-native-sheet-share-dialog button.is-primary { color: white; background: #3156d9; }
.bv-native-sheet-share-dialog button.is-danger { color: #8e1c30; background: #fff0f1; }
.bv-native-sheet-share-dialog button:hover:not(:disabled),
.bv-native-sheet-share-dialog button:focus-visible:not(:disabled) { outline: 3px solid #9db0ff; outline-offset: 2px; transform: translateY(-1px); }
.bv-native-sheet-share-dialog button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 700px) {
  .bv-native-sheet-page-manager {
    left: calc(12px + env(safe-area-inset-left, 0px));
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }
  .bv-native-sheet-share-dialog fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv-native-sheet-share-dialog { padding: 24px 18px; box-shadow: 8px 9px 0 #263e72; }
}
