/* Shared styles for the extension detail pages (/extensions/new-tab/,
   /extensions/portal/, /extensions/pindrop/). Converted from the Vue pages
   2026-10-21 and moved to the Aurora look the same night
   (docs/AURORA_MIGRATION.md, Phase 4). Each page sets its own accent on
   :root in its inline <style> (New Tab sky, Portal orange, PinDrop teal);
   everything here reads it. The Welcome page (/extensions/welcome/) has its
   own inline styles. */

:root {
  --accent: #7dd3fc;
  --accent-2: #38bdf8;
  --primary: var(--accent);
  --bg: #0b1324;
  --panel: rgba(15, 23, 42, 0.62);
  --line: color-mix(in srgb, var(--accent) 16%, transparent);
  --text: rgba(255, 255, 255, 0.95);
  --text-medium: rgba(255, 255, 255, 0.7);
  --ok: #86efac;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Aurora glows in the page's accent, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 15% -5%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(50vw 40vw at 95% 10%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%),
    radial-gradient(60vw 50vw at 50% 110%, rgba(167, 139, 250, 0.1), transparent 70%);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  font-size: 0.85em;
  line-height: 1.5;
}

/* Keep a key combo (Alt+Shift+S) on one line */
.keys {
  white-space: nowrap;
}

.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

.text-medium {
  color: var(--text-medium);
}

/* Navigation */
.extension-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 8px 2rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.25rem;
  margin-right: 0.25rem;
}

.brand-text {
  height: 28px;
  width: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-medium);
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.nav-link.active {
  color: color-mix(in srgb, var(--accent) 85%, white);
  background-color: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  cursor: default;
}

.nav-extension-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-right: 6px;
}

/* Kit primary button: soft accent fill */
.return-btn {
  color: color-mix(in srgb, var(--accent) 85%, white);
  background-color: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.return-btn:hover {
  background-color: color-mix(in srgb, var(--accent) 24%, transparent);
}

@media (max-width: 768px) {
  .extension-nav {
    padding: 8px 16px;
  }

  .nav-content {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
  }

  .nav-left {
    justify-content: center;
  }
}

/* Hero */
.hero {
  text-align: center;
  padding: 56px 16px 40px;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent));
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-medium);
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .hero {
    padding: 36px 16px 28px;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }
}

.availability-badge {
  display: inline-block;
  max-width: 100%;
  padding: 14px 24px 16px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.availability-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ok);
}

.hero-browser-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

/* Kit secondary button: quiet outline */
.hero-browser-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hero-browser-btn .icon {
  width: 18px;
  height: 18px;
}

.hero-browser-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* Content */
.content-backdrop {
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 16px 8px;
}

.content-inner {
  max-width: 970px;
  margin: 0 auto;
}

.section {
  margin-bottom: 40px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.card-body {
  padding: 28px;
}

@media (max-width: 600px) {
  .card-body {
    padding: 20px 16px;
  }
}

.intro {
  font-size: 1.0625rem;
  color: var(--text-medium);
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Feature cards: an accent icon badge, a title and a short text */
.feature-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.feature-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-medium);
}

/* Collapsible panels (FAQ, troubleshooting): native <details> */
.panels {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Inside a card the card already paints the surface */
.card .panels {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.panel:first-child {
  border-top: 0;
}

.panel summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.panel summary::-webkit-details-marker {
  display: none;
}

.panel summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.panel summary::after {
  content: "";
  width: 24px;
  height: 24px;
  margin-left: auto;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s ease;
}

.panel[open] summary::after {
  transform: rotate(180deg);
}

.panel summary .icon {
  color: var(--accent);
}

.panel-body {
  padding: 0 24px 20px;
  font-size: 0.9375rem;
  color: var(--text-medium);
}

.panel-body p + p,
.panel-body p + ol,
.panel-body p + ul,
.panel-body ol + p,
.panel-body ul + p {
  margin-top: 8px;
}

.panel-body ol,
.panel-body ul {
  margin: 0;
  padding-left: 1.5em;
}

/* Footer */
.extension-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 16px;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: #fff;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-content,
  .footer-links {
    gap: 0.75rem;
  }
}
