/* Support Agent Download - help.nebulateam.com.au
 *
 * Standalone stylesheet. The shared app stylesheet (protected.css) is the design
 * reference, not a dependency: this is a single public page, so it carries only the
 * rules it needs rather than 114KB of application CSS.
 *
 * Colours are literal rather than custom properties, matching how protected.css
 * handles its own .public-* pages: those render for external recipients and are
 * always light, so they deliberately opt out of the themed token set. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1b23;
  background: #f2f3f5;
  -webkit-font-smoothing: antialiased;
}

a,
select,
.dl-btn {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

a:focus-visible,
select:focus-visible,
.dl-btn:focus-visible {
  outline: 2px solid #FF6C01;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  a,
  select,
  .dl-btn {
    transition: none;
  }
}

/* ---------- Page shell ---------- */

.public-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f2f3f5;
}

.public-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #FF6C01, #ffb374);
  flex-shrink: 0;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: #e2e4e9;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.public-logo {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.public-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.public-header-title {
  font-weight: 800;
  color: #14151c;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.public-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
}

.public-hero {
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin-bottom: 1.25rem;
}

.public-hero h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #14151c;
}

/* ---------- Card ---------- */

.public-doc-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 60, 0.08), 0 2px 8px rgba(16, 24, 60, 0.04);
  overflow: hidden;
}

/* The shared card defaults to 1400px for full-width document viewers; this one holds
   a single short form. */
.dl-card {
  max-width: 520px;
}

.public-doc-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #f6f7fb;
  border-bottom: 1px solid #dad8d6;
}

.public-doc-icon {
  color: #6b6f80;
  flex-shrink: 0;
}

.public-doc-chrome-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c2e3a;
}

.dl-body {
  padding: 1.5rem;
}

/* ---------- Form ---------- */

.dl-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b6f80;
}

.dl-select-wrap {
  position: relative;
}

/* The chevron is drawn with clip-path rather than a data-URI background image, which
   keeps "data:" out of the img-src CSP directive. The control underneath is still a
   native <select>, so it keeps its own keyboard, screen-reader and mobile-picker
   behaviour - nothing here re-implements a listbox. */
.dl-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  background: currentColor;
  color: #6b6f80;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.dl-select {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  border: 1px solid #cbcedb;
  border-radius: 10px;
  background: #f6f7fb;
  color: #1a1b23;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.dl-select:hover {
  border-color: #b3b7c9;
}

/* ---------- Download button ---------- */

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid #FF6C01;
  border-radius: 10px;
  background: #FF6C01;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dl-btn:hover {
  background: #E05F00;
  border-color: #E05F00;
  color: #ffffff;
}

/* The button starts in this state and download.js clears it once /api/links responds.
   Also applied when the selected platform has no usable link, so the button can never
   send anyone to a dead or wrong URL. */
.dl-btn.is-disabled {
  background: #eef0f5;
  border-color: #dad8d6;
  color: #9698a8;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Status message ---------- */

.dl-message {
  margin: 1rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  background: #eef0f5;
  color: #2c2e3a;
  font-size: 0.85rem;
  line-height: 1.5;
}

.dl-message.is-error {
  background: #FFF1E6;
  color: #9a3d00;
}

.dl-message a {
  color: inherit;
}

/* ---------- Footer ---------- */

.public-footer {
  padding: 1.5rem;
  text-align: center;
  background: #ffffff;
  border-top: 1px solid #dad8d6;
}

.public-footer p {
  margin: 0 auto;
  max-width: 640px;
  color: #6b6f80;
  font-size: 0.8rem;
  line-height: 1.5;
}

.public-footer a {
  color: #6b6f80;
}

.public-footer a:hover {
  color: #FF6C01;
}

.public-footer-copyright {
  margin-top: 0.6rem;
  color: #9698a8;
  font-size: 0.72rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .public-header {
    padding: 0.85rem 1.1rem;
  }

  .public-main {
    padding: 1.5rem 1rem 2.5rem;
  }

  .public-hero h1 {
    font-size: 1.45rem;
  }

  .dl-btn {
    width: 100%;
  }
}
