.ros-document-choice[hidden] {
  display: none !important;
}

.ros-document-choice {
  --ros-doc-blue: #0a66ff;
  --ros-doc-ink: #161617;
  --ros-doc-muted: #6e6e73;
  --ros-doc-line: rgba(20, 20, 24, .10);
  --ros-doc-open: #1769e0;
  --ros-doc-download: #16804a;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(18, 20, 26, .24);
  pointer-events: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-backdrop-filter: grayscale(18%) saturate(78%) blur(4px);
  backdrop-filter: grayscale(18%) saturate(78%) blur(4px);
}

.ros-document-choice__panel {
  position: fixed;
  width: min(286px, calc(100vw - 20px));
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--ros-doc-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 54px rgba(18, 18, 23, .18), 0 2px 8px rgba(18, 18, 23, .08);
  color: var(--ros-doc-ink);
  pointer-events: auto;
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  animation: ros-document-choice-in 90ms cubic-bezier(.2, .75, .25, 1) both;
}

.ros-document-choice__head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 1px 1px 8px;
}

.ros-document-choice__file-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(10, 102, 255, .10);
  border-radius: 8px;
  background: rgba(10, 102, 255, .07);
}

.ros-document-choice__file-icon .ros-document-choice__icon {
  width: 15px;
  height: 15px;
}

.ros-document-choice__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.ros-document-choice__copy strong,
.ros-document-choice__copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ros-document-choice__copy strong {
  color: var(--ros-doc-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.ros-document-choice__copy span {
  color: var(--ros-doc-muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.25;
}

.ros-document-choice__close,
.ros-document-choice__action {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.ros-document-choice__close {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.ros-document-choice__close:hover,
.ros-document-choice__close:focus-visible {
  background: rgba(0, 0, 0, .055);
  outline: none;
}

.ros-document-choice__close .ros-document-choice__icon {
  width: 13px;
  height: 13px;
}

.ros-document-choice__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ros-document-choice__action {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 42px;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--ros-doc-line);
  border-radius: 11px;
  background: #fff;
  color: var(--ros-doc-ink);
  text-align: left;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .025);
  transition: border-color 80ms ease, background 80ms ease, box-shadow 80ms ease, transform 80ms ease;
}

.ros-document-choice__action:hover,
.ros-document-choice__action:focus-visible {
  border-color: rgba(10, 102, 255, .34);
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(10, 102, 255, .09);
  outline: none;
}

.ros-document-choice__action:active {
  transform: scale(.985);
}

.ros-document-choice__action.is-open {
  border-color: rgba(23, 105, 224, .28);
  background: linear-gradient(180deg, #f2f7ff 0%, #e8f1ff 100%);
  color: var(--ros-doc-open);
}

.ros-document-choice__action.is-download {
  border-color: rgba(22, 128, 74, .28);
  background: linear-gradient(180deg, #f1fbf6 0%, #e7f6ee 100%);
  color: var(--ros-doc-download);
}

.ros-document-choice__action.is-open:hover,
.ros-document-choice__action.is-open:focus-visible {
  border-color: rgba(23, 105, 224, .48);
  background: #e3efff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .11);
}

.ros-document-choice__action.is-download:hover,
.ros-document-choice__action.is-download:focus-visible {
  border-color: rgba(22, 128, 74, .48);
  background: #e0f4e9;
  box-shadow: 0 0 0 3px rgba(22, 128, 74, .11);
}

.ros-document-choice__action > .ros-document-choice__icon {
  width: 18px;
  height: 18px;
}

.ros-document-choice__action > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.ros-document-choice__action strong,
.ros-document-choice__action small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ros-document-choice__action strong {
  color: inherit;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: -.005em;
  line-height: 1.25;
}

.ros-document-choice__action small {
  color: var(--ros-doc-muted);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .ros-document-choice {
    display: grid;
    align-items: end;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(18, 20, 26, .26);
    pointer-events: auto;
  }

  .ros-document-choice__panel {
    position: relative;
    inset: auto;
    width: min(100%, 420px);
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
  }

  .ros-document-choice__action {
    min-height: 44px;
  }
}

@media (prefers-color-scheme: dark) {
  .ros-document-choice__panel {
    --ros-doc-ink: #f5f5f7;
    --ros-doc-muted: #a1a1a6;
    --ros-doc-line: rgba(255, 255, 255, .12);
    background: rgba(35, 35, 38, .96);
    box-shadow: 0 18px 58px rgba(0, 0, 0, .48);
  }

  .ros-document-choice__file-icon {
    background: rgba(64, 156, 255, .13);
  }

  .ros-document-choice__action {
    background: rgba(255, 255, 255, .055);
    color: #f5f5f7;
  }

  .ros-document-choice__action.is-open {
    border-color: rgba(74, 151, 255, .42);
    background: rgba(39, 112, 216, .24);
    color: #a9ceff;
  }

  .ros-document-choice__action.is-download {
    border-color: rgba(69, 190, 125, .40);
    background: rgba(30, 137, 80, .22);
    color: #9ee2bc;
  }

  .ros-document-choice__action.is-open:hover,
  .ros-document-choice__action.is-open:focus-visible {
    border-color: rgba(64, 156, 255, .5);
    background: rgba(45, 125, 235, .34);
    box-shadow: 0 0 0 3px rgba(64, 156, 255, .12);
  }

  .ros-document-choice__action.is-download:hover,
  .ros-document-choice__action.is-download:focus-visible {
    border-color: rgba(75, 205, 136, .52);
    background: rgba(33, 151, 88, .32);
    box-shadow: 0 0 0 3px rgba(75, 205, 136, .11);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ros-document-choice__panel {
    animation: none;
  }

  .ros-document-choice__action {
    transition: none;
  }
}

@keyframes ros-document-choice-in {
  from { opacity: 0; transform: translateY(3px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
