/* Oneslice download popup. Builds on the site's own .download-dialog / .dialog-close styles and tokens
   (--paper, --ink, --muted, --slate, --ease, kb-dialog-in / widget-enter / backdrop-in keyframes). */

.os-dl.download-dialog {
  position: fixed;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 34px 34px 30px;
  border: 1px solid #ffffff8c;
  border-radius: var(--radius, 24px);
  background: #e6eff3;
  color: var(--ink, #263b4b);
  box-shadow: 0 30px 110px #1d364a38, 0 2px 0 #ffffffb3 inset;
  overflow: hidden;
  isolation: isolate;
}
.os-dl.download-dialog:before { content: none; }

/* Image background: the site's sky, clear at the top and fading into paper behind the text. */
.os-dl-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #eef4f700 0%, #eef4f7a6 38%, #f2f6f8f2 66%, #f4f7f9 100%),
    url(/ASSETS/images/oneslice-cloud-sky.webp) 50% 18% / cover;
  transform: scale(1.06);
  animation: os-dl-sky 1.6s var(--ease, cubic-bezier(.22, 1, .36, 1)) both;
}
@keyframes os-dl-sky { from { transform: scale(1.14); opacity: .4; } to { transform: scale(1.06); opacity: 1; } }

.os-dl[open] { animation: kb-dialog-in .55s var(--ease, cubic-bezier(.22, 1, .36, 1)) both; }
.os-dl[data-closing] { animation: os-dl-out .22s ease-in both; }
@keyframes os-dl-out { to { opacity: 0; transform: translateY(8px) scale(.985); } }

.os-dl::backdrop {
  background: #d9e7ee30;
  -webkit-backdrop-filter: blur(10px) saturate(1.16);
  backdrop-filter: blur(10px) saturate(1.16);
}

.os-dl-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 99px;
  background: #ffffffa6;
  color: var(--ink, #263b4b);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .45s var(--ease, ease), background .3s;
}
.os-dl-close:hover { background: #fff; transform: rotate(90deg); }
.os-dl-close:focus-visible, .os-dl a:focus-visible { outline: 2px solid var(--accent, #496b82); outline-offset: 3px; }

.os-dl-heading { display: flex; align-items: center; gap: 14px; padding-right: 44px; animation: widget-enter .65s var(--ease) .05s both; }
.os-dl-logo { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 6px 14px #1d364a26); }
.os-dl-heading strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--slate, #2d465a); }
.os-dl-meta { display: block; min-height: 1.5em; font-size: 13px; line-height: 1.5; color: var(--muted, #5c6b76); }

.os-dl .os-dl-title {
  margin: 64px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.055em;
  color: var(--ink, #263b4b);
  animation: widget-enter .7s var(--ease) .12s both;
}

.os-dl-body { margin-top: 14px; animation: widget-enter .7s var(--ease) .2s both; }
.os-dl-text { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ink, #263b4b); }
.os-dl-small { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted, #5c6b76); }
.os-dl-small a { color: var(--slate, #2d465a); text-decoration: underline; text-underline-offset: 3px; }
.os-dl-after:not([hidden]) { animation: widget-enter .5s var(--ease) both; }

.os-dl-loading { display: flex; align-items: center; gap: 12px; color: var(--muted, #5c6b76); }
.os-dl-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #2d465a2e;
  border-top-color: var(--slate, #2d465a);
  border-radius: 99px;
  animation: os-dl-spin .9s linear infinite;
}
@keyframes os-dl-spin { to { transform: rotate(360deg); } }

.os-dl .os-dl-go {
  width: 100%;
  margin-top: 22px;
  min-height: 56px;
  background: var(--slate, #2d465a);
  color: var(--paper, #fcfcf9);
  text-decoration: none;
  box-shadow: 0 14px 34px #2d465a33;
}
.os-dl .os-dl-go:hover { background: #34414e; transform: translateY(-3px); box-shadow: 0 18px 40px #2d465a40; }
.os-dl .os-dl-go.is-started { background: #3d5b71; }
.os-dl-go-icon { display: inline-grid; place-items: center; transition: transform .45s var(--ease, ease); }
.os-dl .os-dl-go:hover .os-dl-go-icon { transform: translateY(2px); }

.os-dl-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--slate, #2d465a);
  text-decoration: none;
  transition: gap .4s var(--ease, ease), color .3s;
}
.os-dl-link:hover { gap: 11px; color: var(--ink, #263b4b); }

.os-dl-maintenance { padding: 16px 18px; border: 1px solid #ffffffb3; border-radius: 16px; background: #ffffff8c; }
.os-dl-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--slate, #2d465a);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.os-dl-inline svg { flex: none; transform: translateY(-1px); }

@media (max-width: 520px) {
  .os-dl.download-dialog { padding: 28px 22px 24px; }
  .os-dl .os-dl-title { margin-top: 48px; font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .os-dl, .os-dl *, .os-dl::backdrop { animation: none !important; transition: none !important; }
}
