/* =========================================================================
   ScrapGuard download page
   ========================================================================= */

.sg-section {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* ---------- Hero ---------- */

.sg-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(94, 234, 212, 0.1) 0%,
    rgba(15, 61, 56, 0.55) 100%
  );
  border: 1px solid rgba(94, 234, 212, 0.22);
}

.sg-hero-icon {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 24px;
  background: rgba(10, 42, 38, 0.6);
  border: 1px solid rgba(94, 234, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(4, 17, 15, 0.45);
}

.sg-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sg-hero-text {
  flex: 1;
  min-width: 0;
}

.sg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.3);
  color: #5eead4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sg-title {
  margin: 0.85rem 0 0.6rem;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sg-title-scrap {
  color: #5eead4;
}

.sg-title-guard {
  color: #ffffff;
}

.sg-subtitle {
  margin: 0 0 1.25rem;
  color: #9cc9c4;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 46ch;
}

.sg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sg-meta-item {
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: rgba(10, 42, 38, 0.5);
  border: 1px solid rgba(94, 234, 212, 0.15);
  color: #cde4e1;
  font-size: 0.82rem;
  font-weight: 600;
}

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

.sg-download-card {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 18px;
  background: rgba(10, 42, 38, 0.5);
  border: 1px solid rgba(94, 234, 212, 0.18);
  text-align: center;
}

.sg-download-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.sg-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 2.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  color: #06231f;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sg-download-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.42);
}

.sg-download-btn:active {
  transform: translateY(0);
}

.sg-download-btn i {
  font-size: 1.25rem;
}

.sg-mirrors {
  width: 100%;
}

.sg-mirrors-label {
  display: block;
  margin-bottom: 0.65rem;
  color: #6b9a95;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sg-mirror-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.sg-mirror-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.22);
  color: #5eead4;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sg-mirror-btn:hover {
  background: rgba(94, 234, 212, 0.16);
  border-color: rgba(94, 234, 212, 0.4);
}

.sg-unavailable {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
  font-weight: 600;
}

.sg-hash-row {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.sg-hash-label {
  color: #6b9a95;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sg-hash-row code {
  color: #9cc9c4;
  font-size: 0.78rem;
  word-break: break-all;
}

/* ---------- Required notice ---------- */

.sg-notice {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  margin-bottom: 2rem;
  border-radius: 16px;
}

.sg-notice-required {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sg-notice-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 1.4rem;
}

.sg-notice-body h2 {
  margin: 0 0 0.5rem;
  color: #fbbf24;
  font-size: 1.2rem;
  font-weight: 700;
}

.sg-notice-body p {
  margin: 0;
  color: #cde4e1;
  line-height: 1.7;
}

/* ---------- Info cards ---------- */

.sg-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.sg-info-card {
  padding: 1.75rem;
  border-radius: 16px;
  background: rgba(10, 42, 38, 0.45);
  border: 1px solid rgba(94, 234, 212, 0.15);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.sg-info-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.35);
}

.sg-info-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 234, 212, 0.12);
  color: #5eead4;
  font-size: 1.25rem;
}

.sg-info-card h3 {
  margin: 0 0 0.6rem;
  color: #e5f1ef;
  font-size: 1.1rem;
  font-weight: 700;
}

.sg-info-card p {
  margin: 0;
  color: #9cc9c4;
  font-size: 0.94rem;
  line-height: 1.65;
}

/* ---------- Requirements ---------- */

.sg-requirements-card,
.sg-steps-card {
  padding: 1.75rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  background: rgba(10, 42, 38, 0.45);
  border: 1px solid rgba(94, 234, 212, 0.15);
}

.sg-requirements-card h2,
.sg-steps-card h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: #5eead4;
  font-size: 1.2rem;
  font-weight: 700;
}

.sg-requirements-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.sg-requirements-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: #cde4e1;
  line-height: 1.5;
}

.sg-requirements-list i {
  color: #5eead4;
  margin-top: 0.15rem;
}

/* ---------- Steps ---------- */

.sg-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.sg-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.sg-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 234, 212, 0.15);
  border: 1px solid rgba(94, 234, 212, 0.3);
  color: #5eead4;
  font-weight: 800;
  font-size: 0.9rem;
}

.sg-steps strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #e5f1ef;
  font-size: 1rem;
}

.sg-steps p {
  margin: 0;
  color: #9cc9c4;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Closing reassurance under the steps. */
.sg-install-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.22);
  color: #cde4e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.sg-install-note i {
  color: #5eead4;
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.sg-steps a,
.sg-help a {
  color: #5eead4;
  text-decoration: none;
  font-weight: 600;
}

.sg-steps a:hover,
.sg-help a:hover {
  text-decoration: underline;
}

/* ---------- Help ---------- */

.sg-help {
  text-align: center;
  color: #9cc9c4;
}

.sg-help p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .sg-hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .sg-hero-icon {
    width: 104px;
    height: 104px;
  }

  .sg-subtitle {
    max-width: none;
  }

  .sg-meta {
    justify-content: center;
  }

  .sg-title {
    font-size: 2.25rem;
  }

  .sg-download-btn {
    width: 100%;
    padding: 1rem 1.5rem;
  }

  .sg-notice {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --- Download in the hero corner ---------------------------------------
   The hero is a two-column flex row; making it wrap and pinning the download
   block to the end puts it bottom-right without disturbing the icon/text
   pairing above it. */
.sg-hero {
  flex-wrap: wrap;
  position: relative;
}

.sg-hero-download {
  margin-left: auto;
  margin-top: auto;
  text-align: right;
  flex: 0 1 auto;
  min-width: 0;
}

.sg-hero-download .sg-download-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.sg-hero-download .sg-hash-row {
  margin: 0.6rem 0 0;
  justify-content: flex-end;
  font-size: 0.7rem;
  opacity: 0.75;
  word-break: break-all;
}

/* Recheck button, sitting with the version meta. */
.sg-recheck {
  background: rgba(94, 234, 212, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #5eead4;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.sg-recheck:hover:not(:disabled) {
  background: #5eead4;
  color: #06231f;
}

.sg-recheck:disabled {
  opacity: 0.6;
  cursor: default;
}

.sg-recheck.is-spinning i {
  animation: sg-spin 0.9s linear infinite;
}

@keyframes sg-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- VirusTotal scan panel --------------------------------------------- */

.sg-scan {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(125, 227, 138, 0.08) 0%,
    rgba(15, 61, 56, 0.55) 100%
  );
  border: 1px solid rgba(125, 227, 138, 0.28);
}

.sg-scan-gauge {
  position: relative;
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  aspect-ratio: 1;
}

.sg-scan-gauge svg {
  width: 100%;
  height: 100%;
  /* Start the sweep at the top rather than at three o'clock. */
  transform: rotate(-90deg);
  /* An SVG clips to its viewport, which sliced a visible straight edge off
     the ring's glow. The viewBox is padded as well; this covers browsers
     that still clip a filter at the viewport edge. */
  overflow: visible;
}

.sg-gauge-track {
  fill: none;
  stroke: rgba(205, 228, 225, 0.12);
  stroke-width: 10;
}

/* 2πr for r=52 is ~326.7. Drawing the full ring from a dash offset lets it
   animate in on load instead of just appearing. */
.sg-gauge-fill {
  fill: none;
  stroke: #7de38a;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  animation: sg-gauge-sweep 1.4s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(125, 227, 138, 0.5));
}

@keyframes sg-gauge-sweep {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-gauge-fill {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.sg-gauge-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.sg-gauge-face strong {
  font-size: 1.9rem;
  font-weight: 800;
  color: #7de38a;
}

.sg-gauge-face span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9cc9c4;
}

.sg-scan-body {
  min-width: 0;
}

.sg-scan-body h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #e5f1ef;
  margin: 0 0 0.6rem;
}

.sg-scan-body h2 i {
  color: #7de38a;
}

.sg-scan-body p {
  color: #cde4e1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 0.6rem;
}

.sg-scan-body strong {
  color: #7de38a;
}

.sg-scan-note {
  color: #9cc9c4 !important;
  font-size: 0.84rem !important;
}

.sg-scan-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.sg-scan-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: rgba(125, 227, 138, 0.14);
  border: 1px solid rgba(125, 227, 138, 0.45);
  color: #7de38a;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sg-scan-link:hover {
  background: #7de38a;
  color: #06231f;
}

.sg-scan-hash {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #9cc9c4;
}

.sg-scan-hash code {
  font-family: "Courier New", monospace;
  word-break: break-all;
}

/* --- Server owners ------------------------------------------------------ */

.sg-owners {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(94, 234, 212, 0.1) 0%,
    rgba(15, 61, 56, 0.55) 100%
  );
  border: 1px solid rgba(94, 234, 212, 0.22);
}

.sg-owners-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(94, 234, 212, 0.14);
  border: 1px solid rgba(94, 234, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #5eead4;
}

.sg-owners-body {
  min-width: 0;
}

.sg-owners-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e5f1ef;
  margin: 0 0 0.6rem;
}

.sg-owners-body p {
  color: #cde4e1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 0.6rem;
}

.sg-owners-body strong {
  color: #5eead4;
}

.sg-owners-note {
  color: #9cc9c4 !important;
  font-size: 0.86rem !important;
}

/* Centred rather than hard against the left edge: it is the one action in
   this panel, so it should read as a button rather than as another line of
   the paragraph above it. */
.sg-owners-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.9rem auto 0;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.sg-owners-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .sg-hero-download {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .sg-hero-download .sg-download-area,
  .sg-hero-download .sg-hash-row {
    align-items: center;
    justify-content: center;
  }

  .sg-scan,
  .sg-owners {
    flex-direction: column;
    text-align: center;
  }

  .sg-scan-actions {
    justify-content: center;
  }
}

/* --- Loading state ------------------------------------------------------
   The version, hash and scan panel arrive from an API, so they can briefly be
   placeholders. Blurring what is there beats blanking it: the layout does not
   jump and a fast response does not read as a flicker. */
.sg-loading {
  position: relative;
  pointer-events: none;
}

.sg-loading > * {
  filter: blur(3px);
  opacity: 0.5;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.sg-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(94, 234, 212, 0.2);
  border-top-color: #5eead4;
  border-radius: 50%;
  animation: sg-spin 0.8s linear infinite;
  filter: none;
  opacity: 1;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .sg-loading > * {
    filter: none;
  }

  .sg-loading::after {
    animation: none;
  }
}

/* The panel body is left-aligned text; give the button its own centred row
   so margin:auto has something to work against. */
.sg-owners-body {
  display: flex;
  flex-direction: column;
}

.sg-owners-cta {
  align-self: center;
}

/* --- Download state ----------------------------------------------------
   Shown only while the current build is being pulled from the node, so the
   person is not staring at a button that appears to do nothing. */
.sg-download-state {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #9cc9c4;
  max-width: 22rem;
}

.sg-download-state[hidden] {
  display: none;
}

.sg-download-btn.is-busy {
  opacity: 0.75;
  pointer-events: none;
}

.sg-download-btn.is-busy i {
  animation: sg-spin 0.9s linear infinite;
}

/* --- Download modal ----------------------------------------------------
   Opens the instant Download is pressed. A 72 MB file gives no feedback for a
   second or two, which is what makes people click three times. */
.sg-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  animation: sg-modal-in 0.18s ease;
}

.sg-modal[hidden] {
  display: none;
}

@keyframes sg-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sg-modal-card {
  position: relative;
  width: min(34rem, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f3d38 0%, #0a2a26 100%);
  border: 1px solid rgba(94, 234, 212, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: sg-card-in 0.22s ease;
}

@keyframes sg-card-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sg-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #9cc9c4;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sg-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #e5f1ef;
}

/* --- the status line --- */
.sg-modal-state {
  text-align: center;
  margin-bottom: 1.5rem;
}

.sg-modal-state h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e5f1ef;
  margin: 0.75rem 0 0.35rem;
}

.sg-modal-sub {
  color: #9cc9c4;
  font-size: 0.86rem;
  margin: 0;
}

.sg-modal-state[data-kind="done"] h2 {
  color: #7de38a;
}

.sg-modal-state[data-kind="error"] h2 {
  color: #ff8a8a;
}

.sg-modal-spinner {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 3px solid rgba(94, 234, 212, 0.2);
  border-top-color: #5eead4;
  border-radius: 50%;
  animation: sg-spin 0.8s linear infinite;
}

.sg-modal-spinner[hidden] {
  display: none;
}

/* --- the warning, which is the real reason this modal exists --- */
.sg-modal-warn {
  padding: 1.1rem;
  border-radius: 12px;
  background: rgba(246, 196, 81, 0.08);
  border: 1px solid rgba(246, 196, 81, 0.32);
}

.sg-modal-warn-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  color: #f6c451;
  font-size: 0.95rem;
}

.sg-modal-warn p {
  color: #cde4e1;
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 0 0 0.7rem;
}

.sg-modal-warn strong {
  color: #e5f1ef;
}

.sg-modal-scan {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: rgba(125, 227, 138, 0.14);
  border: 1px solid rgba(125, 227, 138, 0.45);
  color: #7de38a;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sg-modal-scan:hover {
  background: #7de38a;
  color: #06231f;
}

/* The scan link and the hash together, centred, as one block of proof
   rather than two loose lines pushed against the left edge. */
.sg-modal-proof {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

/* Its own container: a bare 64-character string reads as noise, boxed it
   reads as a reference you could copy. */
.sg-modal-hash {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(156, 201, 196, 0.16);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  line-height: 1.6;
  color: #7fa8a4;
  text-align: center;
  word-break: break-all;
  user-select: all;
}

/* --- actions --- */
.sg-modal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* The countdown under the retry button. It exists so the wait reads as
   deliberate rather than as the button being broken. */
.sg-modal-timer {
  margin: 0;
  font-size: 0.74rem;
  color: #7fa8a4;
  text-align: center;
}

.sg-modal-timer[hidden] {
  display: none;
}

.sg-modal-retry:disabled {
  opacity: 0.5;
  cursor: default;
}

.sg-modal-retry:disabled:hover {
  background: rgba(94, 234, 212, 0.12);
}

.sg-modal-retry,
.sg-modal-done {
  padding: 0.6rem 1.4rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, background 0.2s ease;
}

.sg-modal-retry {
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.12);
  color: #5eead4;
}

.sg-modal-retry:hover {
  background: rgba(94, 234, 212, 0.22);
}

.sg-modal-retry[hidden] {
  display: none;
}

.sg-modal-done {
  border: none;
  background: linear-gradient(135deg, #5eead4, #29a092);
  color: #06231f;
}

.sg-modal-done:hover {
  filter: brightness(1.1);
}

@media (max-width: 520px) {
  .sg-modal-card {
    padding: 1.5rem 1.15rem;
  }
}
