/* iOS 27-inspired web approximation: layered translucency, not an Apple API. */
[data-slot="dialog-content"].owen-soft-glass-dialog {
  isolation: isolate;
  color: rgb(20 31 47 / 0.92);
  background:
    radial-gradient(circle at 16% 0%, rgb(255 255 255 / 0.22), transparent 34%),
    linear-gradient(150deg, rgb(255 255 255 / 0.23), rgb(244 249 255 / 0.09) 56%, rgb(233 244 255 / 0.05)) !important;
  border-color: rgb(255 255 255 / 0.68) !important;
  -webkit-backdrop-filter: blur(30px) saturate(184%) brightness(1.03) contrast(0.99) !important;
  backdrop-filter: blur(30px) saturate(184%) brightness(1.03) contrast(0.99) !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.82),
    inset 0 -1px 0 rgb(255 255 255 / 0.2),
    inset 0 0 42px rgb(255 255 255 / 0.08),
    0 34px 96px rgb(30 48 76 / 0.22) !important;
  --lg-transparency: 0.94;
  --lg-glass-tinted: rgb(242 248 255 / 0.56);
  --lg-lens-blur: 30px;
  --lg-shine: 1.65;
  --lg-contrast: 0.16;
  --lg-brightness: 1.08;
  --lg-saturate: 1.55;
}

[data-slot="dialog-content"].owen-soft-glass-dialog input:not([type="checkbox"]):not([type="radio"]),
[data-slot="dialog-content"].owen-soft-glass-dialog textarea,
[data-slot="dialog-content"].owen-soft-glass-dialog [data-slot="select-trigger"],
[data-slot="dialog-content"].owen-soft-glass-dialog [data-slot="native-select"],
[data-slot="dialog-content"].owen-soft-glass-dialog [data-slot="input-group"],
[data-slot="dialog-content"].owen-soft-glass-dialog button[role="combobox"],
[data-slot="dialog-content"].owen-soft-glass-dialog button[aria-haspopup="dialog"],
[data-slot="dialog-content"].owen-soft-glass-dialog button[aria-haspopup="listbox"] {
  background-color: rgb(255 255 255 / 0.2) !important;
  border-color: rgb(83 105 135 / 0.2) !important;
}

[data-slot="dialog-content"].owen-soft-glass-dialog thead,
[data-slot="dialog-content"].owen-soft-glass-dialog [class*="bg-muted"] {
  background-color: rgb(255 255 255 / 0.13) !important;
}

[data-slot="dialog-content"].owen-soft-glass-dialog tbody tr:hover {
  background-color: rgb(255 255 255 / 0.09) !important;
}

[data-slot="dialog-content"].owen-soft-glass-dialog [class*="border"] {
  border-color: rgb(82 103 132 / 0.16) !important;
}

.owen-soft-glass-popover {
  position: relative;
  z-index: 70;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.68) !important;
  border-radius: 18px !important;
  color: rgb(22 32 48 / 0.92) !important;
  background:
    radial-gradient(circle at 15% 0%, rgb(255 255 255 / 0.32), transparent 36%),
    linear-gradient(155deg, rgb(249 252 255 / 0.36), rgb(235 245 255 / 0.12)) !important;
  -webkit-backdrop-filter: blur(28px) saturate(184%) brightness(1.03) contrast(0.99);
  backdrop-filter: blur(28px) saturate(184%) brightness(1.03) contrast(0.99);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.78),
    inset 0 -1px 0 rgb(255 255 255 / 0.16),
    0 24px 64px rgb(32 52 82 / 0.2) !important;
}

.owen-soft-glass-popover::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 17px;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.1), transparent 43%, rgb(255 255 255 / 0.08));
  content: "";
  pointer-events: none;
}

.owen-soft-glass-popover [class*="hover:bg-accent"]:hover {
  background-color: rgb(255 255 255 / 0.16) !important;
}

.owen-soft-glass-popover [class*="border"] {
  border-color: rgb(82 103 132 / 0.16) !important;
}

html.dark .owen-soft-glass-popover {
  color: rgb(241 245 249 / 0.94) !important;
  background:
    radial-gradient(circle at 15% 0%, rgb(255 255 255 / 0.16), transparent 38%),
    linear-gradient(155deg, rgb(37 48 64 / 0.62), rgb(20 30 44 / 0.42)) !important;
  border-color: rgb(255 255 255 / 0.2) !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-slot="dialog-content"].owen-soft-glass-dialog,
  .owen-soft-glass-popover {
    background: rgb(246 250 255 / 0.94) !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  [data-slot="dialog-content"].owen-soft-glass-dialog,
  .owen-soft-glass-popover {
    background: rgb(248 251 255 / 0.97) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
