/* IM deliverables: Downloads icon in the top bar and the Downloads panel (same glass panel and fade as sign-in). */
.downloads-open{position:absolute;left:54px;top:36px;transform:translateY(-50%);width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;background:transparent;color:#66717a;cursor:pointer;animation:downloads-icon-in .3s ease both}
.downloads-open svg{width:19px;height:19px}
.downloads-open:hover{color:#30373d}
.downloads-open:focus-visible{outline:2px solid #7e8b91;outline-offset:-4px;border-radius:6px}
@keyframes downloads-icon-in{from{opacity:0}to{opacity:1}}
/* With the Downloads icon beside the account icon, a discount chip moves to the right-hand side, beside the phone icon. */
body.has-downloads .discount-open{left:auto;right:58px}
@media(max-width:350px){body.has-downloads .discount-open{padding:0 8px;font-size:11px}}

#downloadsDialog{display:none;width:min(600px,calc(100% - 28px));height:auto;max-height:min(88dvh,820px);box-sizing:border-box;margin:auto;padding:34px 30px 30px;overflow:auto;overscroll-behavior:contain;border-radius:24px;border:1px solid #ffffffc9;background:linear-gradient(145deg,#ffffffd6,#eef2f59e);-webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);box-shadow:0 24px 75px #273a4a26,inset 0 1px 0 #ffffffd9;color:#28313a;font-family:Manrope,"Segoe UI",sans-serif}
#downloadsDialog[open]{display:block;height:fit-content}
#downloadsDialog::backdrop{background:#263b4914;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body:has(#downloadsDialog[open]:not(.closing))>:not(#downloadsDialog){filter:blur(5px)}
#downloadsDialog h2{font:500 23px/1.25 Manrope,"Segoe UI",sans-serif;letter-spacing:-.55px;color:#28313a;text-align:center;margin:0 0 26px}
#downloadsClose{position:absolute;right:10px;top:10px;width:44px;height:44px;border:0;border-radius:10px;background:transparent;font-size:28px;line-height:1;color:#66717a;cursor:pointer}
#downloadsClose:hover{color:#30373d}
#downloadsClose:focus-visible{outline:2px solid #7e8b91;outline-offset:-4px}

.download-item+.download-item{margin-top:26px;padding-top:26px;border-top:1px solid #dfe4e8}
.download-item h3{font:600 17px/1.35 Manrope,"Segoe UI",sans-serif;letter-spacing:-.2px;color:#28313a;margin:0}
.download-property{font-size:13px;line-height:1.5;color:#6b757d;margin:3px 0 0}
.download-styles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:16px 0 0}
.download-style{position:relative;display:flex;flex-direction:column;gap:9px;min-width:0;padding:8px 8px 11px;border:1px solid #dce1e5;border-radius:14px;background:#ffffffb3;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent;user-select:none}
.download-style:hover{border-color:#bfc7cd}
.download-style:focus-visible{outline:2px solid #7e8b91;outline-offset:2px}
.download-style[aria-checked=true]{border-color:#2e5138;background:#f3f8ef;box-shadow:inset 0 0 0 1px #2e5138}
.download-cover{display:block;aspect-ratio:297/210;border-radius:8px;overflow:hidden;background:#e9edf0}
.download-cover img{display:block;width:100%;height:100%;object-fit:contain}
.download-style-text{display:flex;flex-direction:column;gap:2px;padding:0 3px;min-width:0}
.download-style-name{font-size:14px;font-weight:600;line-height:1.3;color:#28313a;overflow-wrap:anywhere}
.download-style-pages{font-size:12px;line-height:1.4;color:#6b757d;font-variant-numeric:tabular-nums}
.download-check{position:absolute;top:14px;right:14px;width:22px;height:22px;border-radius:50%;background:#2e5138;color:#fff;display:none;place-items:center;box-shadow:0 1px 3px #1a2a2033}
.download-check svg{width:13px;height:13px}
.download-style[aria-checked=true] .download-check{display:grid}
#downloadsDialog .download-action{width:100%;min-height:50px;margin:14px 0 0;justify-content:center;border-radius:12px;font:500 15px/1.2 Manrope,"Segoe UI",sans-serif}
#downloadsDialog .download-action:disabled{opacity:1;background:#c9d0d5;border-color:#c9d0d5;color:#fff}
.download-status{min-height:18px;margin:8px 0 0;font-size:12px;line-height:1.5;color:#6b757d;text-align:center}
#downloadsError{margin:16px 0 0;font-size:13px;line-height:1.5;color:#a0392b;text-align:center}
#downloadsError:empty{display:none}

@media(max-width:600px){
  #downloadsDialog{width:calc(100% - 28px);max-width:none;max-height:calc(100dvh - max(calc(env(safe-area-inset-top) + 20px),9dvh) - max(14px,env(safe-area-inset-bottom)));margin:max(calc(env(safe-area-inset-top) + 20px),9dvh) auto auto;padding:30px 18px 22px;border-radius:22px}
  #downloadsDialog h2{margin-bottom:22px}
  .download-styles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .download-style{padding:6px 6px 10px;border-radius:12px}
  .download-cover{border-radius:7px}
  .download-check{top:11px;right:11px}
}
@media(max-width:350px){
  #downloadsDialog{padding-left:14px;padding-right:14px}
  .download-style-name{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.downloads-open{animation:none}.download-style{transition:none}}
