/* ==========================================================================
   Core Coatings — datasheet.css (3 Dec 2026)
   Product pages only. The "Download SDS / TDS" buttons and the small
   "Where should we send it?" email dialog. Uses site.css tokens and form styles.
   ========================================================================== */

/* Buttons inside the Data sheets list */
.downloads .ds-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.downloads .ds-actions .btn { min-height: 44px; padding: 0 var(--s-4); font-size: 15px; }
.downloads .ds-actions .btn .icon { width: 16px; height: 16px; color: currentColor; margin: 0; }
.downloads .ds-sub { font-size: 14px; color: var(--muted); }

/* Dialog */
html.ds-open { overflow: hidden; }
.ds-modal {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 48px -16px rgba(11, 14, 18, .35);
}
/* Padding sits on the inner box, so a click on the dialog element itself is always the backdrop */
.ds-modal__inner { padding: var(--s-6); }
.ds-modal::backdrop { background: rgba(11, 14, 18, .55); }
.ds-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-2); }
.ds-modal .ds-modal__title { font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.ds-modal__doc { font-size: 15px; color: var(--muted); margin: 0 0 var(--s-5); }
.ds-modal__close {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -10px -10px 0 0;
  background: transparent; border: 0; border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.ds-modal__close:hover { background: var(--paper-2); }
.ds-modal__close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ds-modal__close .icon { width: 22px; height: 22px; }
.ds-modal .form { gap: var(--s-4); }
.ds-modal .btn[type="submit"] { width: 100%; }
.ds-modal__note { font-size: 14px; color: var(--muted); margin: 0; }
.ds-modal__fail { padding: var(--s-4); border: 1px solid var(--error); border-radius: var(--radius); color: var(--error); font-size: 15px; font-weight: 500; margin: 0; }
.ds-modal__fail[hidden] { display: none; }
.ds-modal__fail a { color: inherit; font-weight: 600; }

/* Result panel */
.ds-done { display: grid; gap: var(--s-4); }
.ds-done[hidden] { display: none; }
.ds-done:focus, .ds-modal__fail:focus { outline: none; }
.ds-done .form-sent { align-items: center; }
.ds-done .form-sent p { font-size: 17px; margin: 0; }
.ds-done .form-sent .icon { margin-top: 0; }
.ds-done a { font-weight: 600; }

@media (max-width: 639px) {
  .ds-modal__inner { padding: var(--s-5); }
  .ds-modal .ds-modal__title { font-size: 22px; }
}

@media print {
  .ds-actions, .ds-modal { display: none !important; }
}
