/*
 * Plugins on the site (issue 084ae58a), and the «Что дальше» panel every
 * download opens. Shared by index.html, plugin.html, plugins.html and
 * releases.html, each of which keeps its own base styles inline as before.
 *
 * A plugin's own colour (--plugin, one of six — js/plugins.js) goes only on
 * what says "where you are": the hero's stripe and glow, the active tab, the
 * status badge, section markers, a card's top edge. Buttons and links stay the
 * site's cyan everywhere, so «скачать» looks the same on every page.
 */

/* ------------------------------------------------------------ «Что дальше» */

.next {
  max-width: 620px;
  margin: 18px auto 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: left;
  font-size: 14px;
}
.next[hidden] { display: none; }
.next-row { display: flex; align-items: center; gap: 10px; color: var(--text); }
.next-failed { color: #ff8a80; flex-wrap: wrap; }
.next-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: next-spin 0.9s linear infinite;
}
@keyframes next-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .next-spinner { animation: none; } }
.next-head { display: flex; align-items: center; gap: 10px; }
.next-ok {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 188, 212, 0.15); color: var(--accent); font-size: 13px;
}
.next-title { color: var(--text-heading); font-weight: 600; word-break: break-all; }
.next-size { margin-left: auto; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.next-step { color: var(--text-muted); margin: 10px 0 0 32px; line-height: 1.5; }
.next-cmdrow { display: flex; gap: 8px; margin: 8px 0 0 32px; }
.next-cmd {
  flex: 1; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12.5px;
  background: #070a16; border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 10px; color: #c5e8ee; overflow-x: auto; white-space: nowrap;
}
.next-copy {
  font: inherit; font-size: 12px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text);
}
.next-link {
  font: inherit; background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent);
}
.next-link:hover { text-decoration: underline; }
.next-again { display: block; margin: 12px 0 0 32px; font-size: 12.5px; }

/* ------------------------------------------------------------ cards, banner */

.plugin-badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--plugin, var(--accent)); color: var(--plugin, var(--accent));
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  vertical-align: 1px; margin-right: 8px; white-space: nowrap;
}
.plugin-icon { width: 48px; height: 48px; flex: none; object-fit: contain; }
.plugin-icon.placeholder {
  border-radius: 12px; border: 1px dashed var(--border); display: inline-block;
}

/* Spaced as the home page's other sections (.features, .info): by margin
   alone, no rule between them, the same width and the same heading. */
.plugins-section { max-width: 1100px; margin: 80px auto; padding: 0 32px; }
.plugins-section[hidden] { display: none; }
.plugins-section h2 {
  text-align: center; font-size: 32px; font-weight: 700; color: var(--text-heading);
  margin-bottom: 12px; letter-spacing: -0.5px;
}
.plugins-section .lede {
  text-align: center; color: var(--text-muted); max-width: 620px; margin: 0 auto 36px;
}
.plugins-inner { margin: 0 auto; }

.plugin-banner {
  display: flex; align-items: center; gap: 22px; text-decoration: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--plugin) 12%, transparent),
                              transparent 70%), var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--plugin) 40%, var(--border));
  border-radius: 14px; padding: 22px 26px; margin-bottom: 14px; color: var(--text);
}
.plugin-banner .plugin-icon { width: 60px; height: 60px; }
.plugin-banner h3 { color: var(--text-heading); font-size: 20px; }
.plugin-banner .aud { color: var(--plugin); font-size: 12.5px; margin-bottom: 4px; }
.plugin-banner p { color: var(--text-muted); font-size: 14px; }
.plugin-banner .go { margin-left: auto; white-space: nowrap; color: var(--accent); font-weight: 600; }

.plugin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plugin-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-top: 3px solid var(--plugin); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text);
}
.plugin-card:hover { border-color: var(--accent); border-top-color: var(--plugin); }
.plugin-card .top { display: flex; align-items: center; gap: 10px; }
.plugin-card .plugin-icon { width: 36px; height: 36px; }
.plugin-card h3 { color: var(--text-heading); font-size: 16px; }
.plugin-card .aud { font-size: 12px; color: var(--text-muted); }
.plugin-card p { font-size: 13px; color: var(--text-muted); flex: 1; }
.plugin-card .ft {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border);
  padding-top: 8px; margin-top: 4px; white-space: nowrap;
}
.compat-ok { color: #66bb6a; }
.compat-no { color: #ffb74d; }
.plugins-all { text-align: center; margin-top: 18px; }

/* ------------------------------------------------------------ plugin page */

.crumbs { max-width: 1100px; margin: 0 auto; padding: 0 32px; font-size: 13px; color: var(--text-muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.plugin-hero {
  text-align: center; padding: 30px 32px 32px; max-width: 1036px; margin: 0 auto;
  border-top: 3px solid var(--plugin); border-radius: 14px 14px 0 0;
  background: radial-gradient(ellipse at 50% 0%,
              color-mix(in srgb, var(--plugin) 26%, transparent), transparent 70%);
}
.plugin-hero .plugin-icon { width: 96px; height: 96px; margin-bottom: 10px; }
.plugin-hero h1 {
  font-size: 44px; font-weight: 800; color: var(--text-heading); letter-spacing: -1.2px;
}
.plugin-hero .tagline { font-size: 18px; color: var(--text-muted); max-width: 640px; margin: 8px auto 26px; }
.plugin-hero .dl-meta + .dl-meta { margin-top: 4px; }

.plugin-tabs {
  display: flex; justify-content: center; gap: 6px; border-bottom: 1px solid var(--border);
  /* The content column exactly (1100 less the 32 px gutters), so the rule
     under the tabs ends where the cards do. */
  max-width: 1036px; margin: 0 auto; padding: 0; overflow-x: auto;
}
.plugin-tabs a {
  font-size: 14px; padding: 12px 14px; color: var(--text-muted); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.plugin-tabs a:hover { color: var(--text); }
.plugin-tabs a.active { color: var(--text); border-bottom-color: var(--plugin); }

.plugin-body { max-width: 1100px; margin: 0 auto; padding: 28px 32px 48px; }
.section-mark {
  display: flex; align-items: center; gap: 10px; color: var(--text-heading);
  font-size: 18px; font-weight: 700; margin: 26px 0 12px;
}
.section-mark::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--plugin);
}
.plugin-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plugin-feature {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.plugin-feature h4 { color: var(--text-heading); font-size: 15px; margin-bottom: 4px; }
.plugin-feature p { font-size: 13.5px; color: var(--text-muted); }
.status-note {
  margin-top: 18px; font-size: 13.5px; color: var(--text);
  border: 1px solid rgba(255, 183, 77, 0.45); background: rgba(255, 183, 77, 0.07);
  border-radius: 8px; padding: 10px 14px;
}
.plugin-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.plugin-strip > div {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
}
.plugin-strip h4 { color: var(--text-heading); font-size: 13.5px; margin-bottom: 4px; }
.plugin-strip p { font-size: 13px; color: var(--text-muted); }
.plugin-strip a { color: var(--accent); text-decoration: none; }

/* The download page and the versions page. */
.pick {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px;
}
.pick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; color: var(--text-muted); }
.pick select {
  font: inherit; color: var(--text); background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px;
}
.os-tabs { display: inline-flex; gap: 4px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.os-tabs button {
  font: inherit; font-size: 13px; padding: 4px 14px; border-radius: 6px; border: none; cursor: pointer;
  background: none; color: var(--text-muted);
}
.os-tabs button.active { background: var(--card-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.file-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-secondary);
}
.file-row .t { font-weight: 600; color: var(--text-heading); }
.file-row .h { font-size: 12.5px; color: var(--text-muted); }
.file-row .btn { margin-left: auto; padding: 8px 16px; font-size: 14px; }
.callout {
  display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text);
  border: 1px solid rgba(0, 188, 212, 0.35); background: rgba(0, 188, 212, 0.06);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
.callout.warn { border-color: rgba(255, 202, 40, 0.4); background: rgba(255, 202, 40, 0.06); }
.callout .m { color: var(--text-muted); font-size: 13px; }
.callout a { color: var(--accent); text-decoration: none; }
.version-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.version-card h3 { color: var(--text-heading); font-size: 17px; display: flex; align-items: center; gap: 10px; }
.version-card .for { font-size: 13px; color: var(--text-muted); margin: 6px 0 10px; }
.version-files {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; align-items: center;
}
.version-files .cap { font-size: 13px; color: var(--text-muted); }
.version-card .files { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text);
}
.file-btn span { color: var(--text-muted); font-size: 11.5px; margin-left: 6px; }
.file-btn:hover { border-color: var(--accent); }
.muted-note { color: var(--text-muted); font-size: 14px; }

/* The catalogue. */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button {
  font: inherit; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: none; color: var(--text-muted);
}
.filters button.active { border-color: var(--accent); color: var(--text); background: rgba(0, 188, 212, 0.08); }

/* Phone: the plugin page in one column; instead of the platform buttons, a way
   to send the page to a computer — an installer for a PC is not something one
   downloads on a phone, and the page is opened from Telegram more than not. */
.share-block { display: none; }
@media (max-width: 700px) {
  .plugin-hero h1 { font-size: 32px; }
  .plugin-hero .plugin-icon { width: 64px; height: 64px; }
  .plugin-hero .download-group, .plugin-hero .dl-meta.only { display: none; }
  .share-block {
    display: block; text-align: left; max-width: 420px; margin: 0 auto;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; font-size: 13.5px;
  }
  .share-block .row { display: flex; gap: 8px; margin-top: 10px; }
  .share-block .btn { flex: 1; justify-content: center; padding: 9px 10px; font-size: 13.5px; }
  .plugin-features, .plugin-cards { grid-template-columns: 1fr; }
  .plugin-strip { grid-template-columns: 1fr 1fr; }
  .plugin-banner { flex-wrap: wrap; }
  .plugin-tabs { justify-content: flex-start; padding: 0 16px; }
}

/* Releases page: the plugins built for a release, one line. */
.plugins-line { font-size: 13.5px; color: var(--text-muted); margin: 12px 0 0; }
.plugins-line:empty { display: none; }
.plugins-line .cap { margin-right: 6px; }
.plugins-line a { color: var(--accent); text-decoration: none; }
.plugins-line a:hover { text-decoration: underline; }
