/* =========================================================
   RG Herd Help Center
   Mobile override stylesheet
   Loaded after /help/help.css
   ========================================================= */

@media (max-width: 760px) {

  /* Mobile background: neutral grey/slate, no green cast */
  html {
    background: #111827 !important;
  }

  body {
    background:
      radial-gradient(circle at 16% 0%, rgba(148, 163, 184, 0.10), transparent 34%),
      radial-gradient(circle at 86% 8%, rgba(214, 191, 154, 0.07), transparent 28%),
      linear-gradient(180deg, #1f2937 0%, #111827 48%, #0f172a 100%) !important;
    color: #e5e7eb;
  }

  header {
    background: rgba(17, 24, 39, 0.92) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
  }

  .brand-page-label,
  nav a {
    color: #cbd5e1 !important;
  }

  .section-head,
  .card,
  details,
  .note {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.060), rgba(255,255,255,0.026)) !important;
  }

  h1, h2, h3, summary {
    color: #f3f4f6;
  }

  p,
  .card p,
  details p,
  li {
    color: #cbd5e1;
  }

html,
  body {
    overflow-x: hidden;
  }

  .wrap {
    width: min(100% - 28px, 1120px);
  }

  /* Header */
  header {
    position: sticky;
    top: 0;
  }

  .nav {
    min-height: 0;
    padding: 14px 0;
    gap: 12px;
  }

  .brand-logo-link {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .brand-logo-img {
    height: 32px;
    max-width: 148px;
  }

  .brand-page-label {
    min-height: 24px;
    padding-left: 0;
    border-left: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  nav ul {
    width: max-content;
    flex-wrap: nowrap;
    gap: 6px;
  }

  nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  /* Hero */
  main {
    padding-bottom: 42px;
  }

  .hero {
    padding: 36px 0 24px;
  }

  .eyebrow {
    font-size: 0.72rem;
    padding: 7px 10px;
  }

  h1 {
    margin-top: 16px;
    font-size: clamp(2.05rem, 13vw, 3.4rem);
    line-height: 0.98;
    max-width: 100%;
  }

  h2 {
    font-size: clamp(1.65rem, 9vw, 2.25rem);
  }

  h3 {
    font-size: 1.02rem;
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 1rem;
  }

  .hero-actions,
  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .btn {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
  }

  /* Sections */
  .section {
    padding: 34px 0;
  }

  .section-head {
    display: block;
    padding: 22px 34px 22px 20px;
    margin-bottom: 20px;
  }

  .section-head p {
    margin-top: 14px;
    font-size: 0.96rem;
  }

  .grid,
  .grid.two,
  .grid.three,
  #quick-support .grid.three {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Cards */
  .card,
  #quick-support .card,
  .details-body .card,
  .note,
  .support-box {
    min-height: auto;
    padding: 22px 34px 22px 20px;
  }

  .card::after,
  details::after,
  .support-box::after {
    width: 4px;
  }

  .card .mini-link {
    margin-top: 14px;
  }

  /* Project collapsible summaries */
  #projects details > summary.project-summary {
    grid-template-columns: 112px minmax(0, 1fr) 30px;
    column-gap: 12px;
    min-height: 74px;
    padding: 16px 48px 16px 18px;
  }

  #projects .project-logo-cell {
    width: 104px;
    height: 32px;
  }

  #projects .project-logo-cell img {
    max-width: 104px;
  }

  #projects .project-summary-rgtv .project-logo-cell {
    width: 62px;
    height: 40px;
  }

  #projects .project-summary-rgtv .project-logo-cell img {
    max-width: 62px;
  }

  #projects .project-title-cell {
    grid-column: 2;
    width: auto;
    min-width: 0;
    max-width: none;
    justify-self: start;
    white-space: normal;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  #projects details > summary.project-summary::after {
    grid-column: 3;
    width: 28px;
    height: 28px;
    margin: 0;
  }

  /* Generic details */
  summary {
    min-height: 64px;
    padding: 18px 48px 18px 18px;
    font-size: 1rem;
    line-height: 1.2;
  }

  summary::after {
    width: 28px;
    height: 28px;
    margin-right: 0;
  }

  .details-body {
    padding: 22px 34px 24px 20px;
  }

  .details-body > * + * {
    margin-top: 14px;
  }

  /* Common issues */
  #troubleshooting details > summary {
    gap: 12px;
  }

  #troubleshooting details > summary::after {
    margin-left: 10px;
  }

  #troubleshooting .ci-summary-copy {
    font-size: 1rem;
    line-height: 1.2;
  }

  /* Footer */
  .help-footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding: 24px 0;
  }

  .help-footer-signal {
    max-width: 100%;
    font-size: 0.68rem;
    letter-spacing: 0.13em;
  }

  .help-footer-links {
    gap: 10px 14px;
  }

  .help-footer-logos {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .help-footer-logos img {
    height: 22px;
    max-width: 96px;
  }

  .help-footer-logos .footer-rgtv-logo {
    height: 32px;
    max-width: 52px;
  }

  /* ARGUS beta popup */
  .argus-beta-popup {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 18px;
  }

  .argus-beta-popup-logo {
    height: 34px;
  }

  .argus-beta-popup-title {
    font-size: 0.9rem;
  }

  .argus-beta-popup-copy {
    font-size: 0.86rem;
    line-height: 1.48;
  }

  .argus-beta-popup-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .argus-beta-popup-actions a {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(100% - 22px, 1120px);
  }

  .brand-logo-img {
    height: 28px;
    max-width: 130px;
  }

  .brand-page-label {
    font-size: 0.66rem;
  }

  h1 {
    font-size: clamp(1.9rem, 14vw, 2.75rem);
  }

  #projects details > summary.project-summary {
    grid-template-columns: 96px minmax(0, 1fr) 28px;
    padding-left: 14px;
    padding-right: 42px;
  }

  #projects .project-logo-cell {
    width: 90px;
    height: 30px;
  }

  #projects .project-logo-cell img {
    max-width: 90px;
  }

  #projects .project-summary-rgtv .project-logo-cell {
    width: 54px;
    height: 36px;
  }

  #projects .project-title-cell {
    font-size: 0.9rem;
  }

  .card,
  #quick-support .card,
  .details-body .card,
  .note,
  .support-box,
  .details-body {
    padding-left: 18px;
    padding-right: 30px;
  }
}


/* mobile-glass-cards-v1: transparent/glass-like mobile surfaces */
@media (max-width: 760px) {
  .section-head,
  .card,
  #quick-support .card,
  details,
  .note,
  .support-box {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.035)) !important;
    border: 1px solid rgba(255,255,255,0.075) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.09),
      0 14px 34px rgba(0,0,0,0.14) !important;
    backdrop-filter: blur(18px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(120%) !important;
  }

  .details-body .card {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.020)) !important;
    border: 1px solid rgba(255,255,255,0.055) !important;
    box-shadow: none !important;
  }

  details[open] summary {
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  }

  .note {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.030)) !important;
  }

  .placeholder {
    background:
      linear-gradient(180deg, rgba(217,45,58,0.12), rgba(217,45,58,0.045)) !important;
    border-left: 3px solid rgba(217,45,58,0.62) !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    border-right: 1px solid rgba(255,255,255,0.04) !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  }

  .support-box {
    background:
      radial-gradient(circle at top right, rgba(19,138,67,0.14), transparent 34%),
      linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.42)) !important;
  }

  summary::after {
    background: rgba(255,255,255,0.10) !important;
    border-color: rgba(255,255,255,0.11) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  .btn {
    background: rgba(255,255,255,0.085);
    border-color: rgba(255,255,255,0.14);
    color: #f8fafc;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .btn.dark {
    background: rgba(15,23,42,0.72);
  }
}
/* end mobile-glass-cards-v1 */


/* mobile-hero-text-v1: make mobile hero readable on dark/glass background */
@media (max-width: 760px) {
  .hero h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 18px rgba(0,0,0,0.32);
  }

  .hero-copy,
  .hero-copy p,
  .hero-copy strong,
  .hero p {
    color: #e5e7eb !important;
  }

  .hero-copy strong {
    color: #ffffff !important;
  }

  .hero .eyebrow {
    color: #f8fafc !important;
    background: rgba(255,255,255,0.09) !important;
    border-color: rgba(255,255,255,0.14) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
/* end mobile-hero-text-v1 */


/* mobile-readability-box-reduction-v1: fewer boxes + brighter mobile text */
@media (max-width: 760px) {
  /* Kill most visible frames; keep layout, spacing, and accent bars */
  .section-head,
  .card,
  #quick-support .card,
  details,
  .note,
  .details-body .card {
    border: 0 !important;
    box-shadow: none !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.070), rgba(255,255,255,0.020)) !important;
  }

  .section-head {
    background:
      linear-gradient(90deg, rgba(255,255,255,0.070), rgba(255,255,255,0.018) 72%, transparent) !important;
  }

  .details-body .card {
    background: transparent !important;
  }

  details[open] summary {
    border-bottom: 1px solid rgba(255,255,255,0.055) !important;
  }

  .details-body {
    border-top: 0 !important;
  }

  /* Notes should feel like inline callouts, not boxes */
  .note {
    background: rgba(255,255,255,0.045) !important;
    border-left: 3px solid rgba(255,255,255,0.16) !important;
  }

  .placeholder {
    background: rgba(217,45,58,0.08) !important;
    border-left: 3px solid rgba(217,45,58,0.70) !important;
    color: #fecaca !important;
  }

  /* Mobile text readability */
  body,
  main,
  .section,
  .details-body {
    color: #f8fafc !important;
  }

  h1,
  h2,
  h3,
  summary,
  .project-title-cell,
  .support-box h2 {
    color: #ffffff !important;
  }

  p,
  li,
  .card p,
  details p,
  .details-body p,
  .section-head p,
  .hero-copy,
  .support-box p {
    color: #e5e7eb !important;
  }

  .label,
  .eyebrow,
  .help-footer-signal,
  .help-footer-links,
  .brand-page-label,
  nav a {
    color: #cbd5e1 !important;
  }

  strong {
    color: #ffffff !important;
  }

  code {
    background: rgba(255,255,255,0.10) !important;
    color: #ffffff !important;
  }

  .card .mini-link,
  .details-body .mini-link,
  a {
    color: inherit;
  }

  /* Keep identity colors, but brighten them for dark mobile background */
  .project-text.project-base {
    color: #9fbd8f !important;
  }

  .project-text.project-argus,
  #troubleshooting .ci-argus {
    color: #9bdcff !important;
  }

  .project-text.project-rgtv,
  #troubleshooting .ci-rgtv {
    color: #c4b5fd !important;
  }

  .project-text.project-alerts,
  #troubleshooting .ci-alerts {
    color: #fb7185 !important;
  }

  #quick-support .card:nth-child(1) .label,
  #quick-support .card:nth-child(1) .mini-link {
    color: #86efac !important;
  }

  #quick-support .card:nth-child(2) .label,
  #quick-support .card:nth-child(2) .mini-link,
  #quick-support .card:nth-child(6) .label,
  #quick-support .card:nth-child(6) .mini-link {
    color: #cbd5e1 !important;
  }

  #quick-support .card:nth-child(3) .label,
  #quick-support .card:nth-child(3) .mini-link {
    color: #9bdcff !important;
  }

  #quick-support .card:nth-child(4) .label,
  #quick-support .card:nth-child(4) .mini-link {
    color: #c4b5fd !important;
  }

  #quick-support .card:nth-child(5) .label,
  #quick-support .card:nth-child(5) .mini-link {
    color: #fb7185 !important;
  }

  /* Keep the + controls readable without looking like extra cards */
  summary::after {
    background: rgba(255,255,255,0.07) !important;
    border: 0 !important;
    color: currentColor !important;
    box-shadow: none !important;
  }

  /* Footer text readability */
  .help-footer-links a {
    color: #cbd5e1 !important;
  }

  .help-footer-links a:hover,
  .help-footer-links a:focus {
    color: #ffffff !important;
  }
}
/* end mobile-readability-box-reduction-v1 */


/* mobile-frame-reduction-v2: convert mobile from stacked boxes to section/row layout */
@media (max-width: 760px) {
  /* Stop most content blocks from looking like individual framed cards */
  .card,
  #quick-support .card,
  .details-body .card,
  .note {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .card::after,
  #quick-support .card::after,
  .details-body .card::after,
  .note::after {
    content: none !important;
    display: none !important;
  }

  /* Section headers become text headers, not cards */
  .section-head {
    padding: 0 6px 18px 0 !important;
    margin-bottom: 10px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .section-head::after {
    display: none !important;
  }

  /* Quick support becomes a clean row list */
  #quick-support .grid.three {
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  #quick-support .card {
    min-height: 0 !important;
    padding: 18px 10px 18px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.075) !important;
  }

  #quick-support .card:last-child {
    border-bottom: 0 !important;
  }

  #quick-support .card .label {
    margin-bottom: 7px !important;
  }

  #quick-support .card .mini-link {
    margin-top: 10px !important;
  }

  /* Security cards also become rows */
  #security .grid.three {
    gap: 0 !important;
  }

  #security .card {
    padding: 18px 10px 18px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.075) !important;
  }

  #security .card:last-child {
    border-bottom: 0 !important;
  }

  /* Details rows: no framed boxes, only subtle row separation */
  details {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.075) !important;
  }

  details::after {
    width: 3px !important;
    opacity: 0.78 !important;
  }

  details + details {
    margin-top: 0 !important;
  }

  summary {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  details[open] summary {
    border-bottom: 1px solid rgba(255,255,255,0.055) !important;
  }

  .details-body {
    padding-top: 18px !important;
    padding-bottom: 22px !important;
  }

  .details-body .grid.two,
  .details-body .grid.three {
    gap: 0 !important;
  }

  .details-body .card {
    min-height: 0 !important;
    padding: 16px 6px 16px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  }

  .details-body .card:last-child {
    border-bottom: 0 !important;
  }

  /* Notes become callout text, not cards */
  .note {
    padding: 14px 14px 14px 14px !important;
    margin-top: 12px !important;
    border-left: 3px solid rgba(255,255,255,0.18) !important;
  }

  .placeholder {
    border-left-color: rgba(217,45,58,0.70) !important;
  }

  /* Keep the support box as the one strong block on the page */
  .support-box {
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,0.18) !important;
  }

  /* Reduce visual noise in project rows specifically */
  #projects details > summary.project-summary {
    border: 0 !important;
  }

  #projects .project-logo-cell,
  #projects .project-title-cell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}
/* end mobile-frame-reduction-v2 */


/* mobile-sticky-header-v1: keep mobile header/navbar visible while scrolling */
@media (max-width: 760px) {
  header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 200 !important;
    background: rgba(17, 24, 39, 0.94) !important;
    border-bottom: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.22) !important;
    backdrop-filter: blur(18px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
  }

  body {
    padding-top: 122px !important;
  }

  .nav {
    padding-top: 12px !important;
    padding-bottom: 10px !important;
  }

  nav {
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .skip:focus {
    top: 130px;
  }
}

@media (max-width: 420px) {
  body {
    padding-top: 116px !important;
  }

  .skip:focus {
    top: 124px;
  }
}
/* end mobile-sticky-header-v1 */

/* Mobile/background safety: force grey surface on small screens */
html,
body {
  background: #232830 !important;
  background-color: #232830 !important;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
}

/* Mobile header safety: keep Help header on grey support-portal surface */
@media (max-width: 768px) {
  header {
    background: #232830 !important;
    background-color: #232830 !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.18) !important;
  }

  header .wrap,
  header .nav {
    background: #232830 !important;
    background-color: #232830 !important;
  }

  header nav {
    background: #232830 !important;
    background-color: #232830 !important;
  }

  header nav ul {
    background: #232830 !important;
    background-color: #232830 !important;
  }
}

/* Help mobile grey lift */
html,
body,
header,
header .wrap,
header .nav,
header nav,
header nav ul {
  background: #2b313a !important;
  background-color: #2b313a !important;
}

/* Revert mobile/tablet background depth, keep readable grey text */
html,
body,
header,
header .wrap,
header .nav,
header nav,
header nav ul {
  background: #232830 !important;
  background-color: #232830 !important;
}

p,
li,
dd,
dt {
  color: #d7dee8 !important;
}
