/* ============================================================
   page-mri.css — Page MRI module styles
   Scope prefix: .pmri-*
   Design tokens from design-system.css
   ============================================================ */

/* ── Layout wrap ─────────────────────────────────────────── */
.pmri-wrap {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

/* ── Hero ────────────────────────────────────────────────── */
.pmri-hero {
  margin-bottom: 2rem;
  text-align: center;
}

.pmri-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pmri-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.pmri-subtitle--url {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  word-break: break-all;
}

/* ── Card ────────────────────────────────────────────────── */
.pmri-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.pmri-card--placeholder {
  text-align: center;
  padding: 2.5rem;
}

.pmri-placeholder-msg {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ── Form ────────────────────────────────────────────────── */
.pmri-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.pmri-input-row {
  display: flex;
  gap: 0.75rem;
}

.pmri-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  min-width: 0;
  transition: border-color 0.15s;
}

.pmri-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* ── Button ──────────────────────────────────────────────── */
.pmri-btn {
  background: var(--accent-blue);
  color: #0d1117;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s;
  text-decoration: none;
}

.pmri-btn:hover {
  opacity: 0.85;
  color: #0d1117;
  text-decoration: none;
}

.pmri-btn--outline {
  background: transparent;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

.pmri-btn--outline:hover {
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent-blue);
  opacity: 1;
}

/* ── Spinner (three dots) ────────────────────────────────── */
.pmri-spinner {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pmri-spinner__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pmri-bounce 0.9s infinite ease-in-out;
}

.pmri-spinner__dot:nth-child(2) { animation-delay: 0.15s; }
.pmri-spinner__dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes pmri-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.0); opacity: 1;   }
}

/* ── Flash messages ──────────────────────────────────────── */
.pmri-flash {
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.pmri-flash--warning {
  background: rgba(210, 153, 34, 0.12);
  border: 1px solid rgba(210, 153, 34, 0.35);
  color: #d29922;
}

.pmri-flash--danger {
  background: rgba(218, 54, 51, 0.1);
  border: 1px solid rgba(218, 54, 51, 0.3);
  color: #f85149;
}

.pmri-flash--success {
  background: rgba(46, 160, 67, 0.1);
  border: 1px solid rgba(46, 160, 67, 0.3);
  color: #3fb950;
}

/* ── Recent scans list ───────────────────────────────────── */
.pmri-recent {
  margin-top: 0.5rem;
}

.pmri-recent__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.pmri-recent__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pmri-recent__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.pmri-recent__item:last-child {
  border-bottom: none;
}

.pmri-recent__link {
  flex: 1;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  word-break: break-all;
  min-width: 0;
}

.pmri-recent__link:hover {
  text-decoration: underline;
}

.pmri-recent__date {
  color: var(--text-secondary);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ── Status badges ───────────────────────────────────────── */
.pmri-recent__status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  white-space: nowrap;
}

.pmri-status--pending {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

.pmri-status--running {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent-blue);
}

.pmri-status--done {
  background: rgba(46, 160, 67, 0.15);
  color: #3fb950;
}

.pmri-status--error {
  background: rgba(218, 54, 51, 0.12);
  color: #f85149;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .pmri-input-row {
    flex-direction: column;
  }

  .pmri-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Grade CTA banners ───────────────────────────────────────────────────── */

/* SUBTLE — Grade A/B */
.cta-banner-subtle {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 24px 0;
}
.cta-banner-subtle .cta-headline {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 6px 0;
}
.cta-banner-subtle .cta-subtext {
    font-size: 0.95rem;
    color: #999;
    margin: 0 0 16px 0;
}
.cta-banner-subtle .cta-button {
    display: inline-block;
    padding: 10px 22px;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* AMBER — Grade C */
.cta-banner-amber {
    background: #2a1f00;
    border: 2px solid #f0a500;
    border-radius: 6px;
    padding: 28px 32px;
    margin: 24px 0;
}
.cta-banner-amber .cta-headline {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0a500;
    margin: 0 0 8px 0;
}
.cta-banner-amber .cta-subtext {
    font-size: 1rem;
    color: #d4a017;
    margin: 0 0 20px 0;
}
.cta-banner-amber .cta-button {
    display: inline-block;
    padding: 12px 28px;
    background: #f0a500;
    border: none;
    border-radius: 4px;
    color: #000;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* ORANGE — Grade D */
.cta-banner-orange {
    background: #2a1200;
    border: 2px solid #ff6a00;
    border-radius: 6px;
    padding: 32px 36px;
    margin: 24px 0;
}
.cta-banner-orange .cta-headline {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff6a00;
    margin: 0 0 10px 0;
}
.cta-banner-orange .cta-subtext {
    font-size: 1.05rem;
    color: #ff9a50;
    margin: 0 0 24px 0;
}
.cta-banner-orange .cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: #ff6a00;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* RED — Grade F */
.cta-banner-red {
    background: #200000;
    border: 3px solid #e02020;
    border-radius: 6px;
    padding: 36px 40px;
    margin: 24px 0;
}
.cta-banner-red .cta-headline {
    font-size: 1.8rem;
    font-weight: 900;
    color: #e02020;
    margin: 0 0 10px 0;
}
.cta-banner-red .cta-subtext {
    font-size: 1.1rem;
    color: #ff6060;
    margin: 0 0 26px 0;
}
.cta-banner-red .cta-button {
    display: inline-block;
    padding: 16px 36px;
    background: #e02020;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
