/*
Theme Name: Radio Network Theme
Author: Alain Ryckelynck / AJ-Group.net
Version: 1.3
*/

/* Gutenberg alignment helpers (needed for AJAX nav, respects editor classes) */
.wp-block-image .alignright { float: right; margin: .5em 0 .5em 1em; }
.wp-block-image .alignleft  { float: left;  margin: .5em 1em .5em 0; }
.wp-block-image .aligncenter { margin-left: auto; margin-right: auto; }

/* === Theme Variables (Default: Dark Mode) === */
:root {
  --bg: #111;
  --text: #eee;
  --text-light: #bbb;
  --accent: #ff06b5;
  --link: #66f;

  --font-body: 'IBM Plex Mono', monospace;
  --font-heading: 'Space Grotesk', sans-serif;
}

/* === Light Mode Variables === */
body[data-theme='light'] {
  --bg: #ffffff;
  --text: #111111;
  --text-light: #444444;
  --accent: #c4007d;
  --link: #0066cc;
}
body[data-theme='dark'] .site-branding img {
  filter: invert(1);
}

/* === Global Styles === */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
}

/* === Toggle Button === */
.theme-toggle {
  position: static;
  top: 30px;
  right: 30px;
  cursor: pointer;
  font-size: 1.6rem;
  z-index: 9999;
  user-select: none;
}

/* === Shared Layout === */
.site-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--bg);
  /*border-bottom: 1px solid rgba(255,255,255,0.1);*/
}



/* ONE line. Period. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  /*background-color: #FF06B5;*/
  background-color: #777;
  pointer-events: none;
}




/* === Top Utility Bar === */

.player-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-logo {
  display: flex;
  align-items: center;
}
.top-logo img {
  height: 28px;
  width: auto;
  display: block;
}
/* Dark mode: invert the logo */
body[data-theme='dark'] .top-logo img {
  filter: invert(1);
}
/* Light mode: ensure normal */
body[data-theme='light'] .top-logo img {
  filter: none;
}


/* row 1 */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 1rem;
  /*border-bottom: 1px solid rgba(255,255,255,0.1);*/
  border-bottom: none;
}

/* row 2 (already exists, just spacing) */
.header-bar {
  padding: 0.2rem 1rem;
  padding: 0.6rem 1rem;
}

.top-bar {
/*  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--bg);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);*/
}

body[data-theme='light'] .top-bar {
  /*border-bottom: 1px solid rgba(0,0,0,0.1);*/
}

.site-header {
  /*margin-top: 0.5rem;*/
}

.site-header,
.site-footer {
  padding: 1rem 0;
}

.site-header h1,
.site-footer {
  text-align: left;
}

.site-title {
  font-size: 2.5rem;
  margin: 0;
}

.site-footer {
  color: var(--text-light);
  font-style: italic;
}

.intro-separator {
  height: 4px;
  border: none;
  background: linear-gradient(to right, #ffcc00, #ff3300);
  box-shadow: 0 0 8px #ffaa00;
  margin: 2rem 0;
}

/* === Article Page === */
.article-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body[data-theme='light'] .article-card {
  background: #f5f5f5;
  border: 1px solid #ccc;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
}

.article-full {
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem;
  border: 1px solid #333;
  border-radius: 8px;
  background-color: #1a1a1a;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body[data-theme='light'] .article-full {
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.03);
}

.article-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: 800;
  text-align: left;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.article-group-link {
  margin-bottom: 1.5rem;
  display: block;
  color: var(--text-light);
}

.article-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* === Latest Articles === */
.latest-global-articles {
  margin: 3rem 0;
  padding: 0 1rem;
}

.latest-global-articles h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.recent-article-list {
  list-style: none;
  padding: 0;
}

.recent-article-list-title {
  font-size: 1.2rem;
  color: var(--accent);
}

.recent-article-list li {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #222;
  border-left: 4px solid var(--accent);
  transition: background 0.3s;
}

.recent-article-list li:hover {
  background: #333;
}

body[data-theme='light'] .recent-article-list li {
  background: #f3f3f3;
}

body[data-theme='light'] .recent-article-list li:hover {
  background: #e9e9e9;
}

.recent-article-list a {
  color: var(--text);
  font-weight: bold;
}

/* === Group Intro === */
.group-intro {
  background: #222;
  padding: 2rem;
  border-left: 5px solid var(--accent);
  margin-bottom: 3rem;
}

body[data-theme='light'] .group-intro {
  background: #f0f0f0;
}

/* === Pagination === */
.pagination {
  text-align: center;
  margin-top: 3rem;
}

.pagination a {
  color: var(--text-light);
  margin: 0 0.5rem;
}

.pagination .current {
  color: var(--accent);
  font-weight: bold;
}

/* === Group Select Dropdown === */
.group-nav select {
  background-color: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5em;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.group-nav label {
  display: block;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  color: #ccc;
}

body[data-theme='light'] .group-nav select {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}

body[data-theme='light'] .group-nav label {
  color: #444;
}


/* === Header Layout === */
.header-bar {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: nowrap;
}
.site-branding {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
.site-branding img {
  height: 56px;
  width: 100%;
  max-width: 100%;
}


/* Smaller title on group archive pages */
body.tax-rg_group .site-title {
  font-size: 1.8rem;
  margin: 0;
}

/* Align dropdown to right */
.group-nav {
  flex: 0 0 auto;
}


.group-nav label {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

/* === Group Name Header === */
.group-name-header h2 {
  font-size: 2rem;
  margin: 1rem 0 2rem;
  font-weight: bold;
  color: #00FF66;
}

body[data-theme='light'] .group-name-header h2 {
  color: #00994c;
}

h2.group-name {
  color: #00FF66;
}

body[data-theme='light'] h2.group-name {
  color: #00994c;
}


/* === Sticky Audio Player === */


#sticky-player {
    position: static;
    top: auto;
    z-index: 9999;
    /*background-color: #e6007e;
    background-color: #a36;*/
    color: #aaa;
    padding: 10px 20px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.3);*/
}

.player-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

#sticky-player button {
    /*background: white;*/
    background: #ddd;
    color: #e6007e;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

#sticky-player button:hover {
    background: #ffe3f2;
}

/* === Player button loading state === */
/* with pulsating dot */
/*
#sticky-player button.loading {
  position: relative;
  color: #e6007e;
}
#sticky-player button.loading::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1s infinite ease-in-out;
}
@keyframes pulse {
  0%   { opacity: 0.2; transform: scale(0.8); }
  50%  { opacity: 1;   transform: scale(1.2); }
  100% { opacity: 0.2; transform: scale(0.8); }
}*/

/* === Player button loading (hourglass) === */

#sticky-player button.loading {
  cursor: wait;
  opacity: 0.9;
  animation: hourglass-pulse 1.2s infinite ease-in-out;
}

#sticky-player button:disabled {
  pointer-events: none;
  opacity: 0.7;
}

@keyframes hourglass-pulse {
  0%   { transform: scale(0.9); opacity: 0.6; }
  50%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}






/* === Responsive === */
@media (max-width: 768px) {

  /* shrink Radio Player text + controls */
  #sticky-player {
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
  }

  #sticky-player strong {
    font-size: 0.75rem !important;
  }

  #sticky-player button {
    font-size: 0.8rem !important;
    padding: 2px 8px !important;
  }

  .site-header {
    padding: 0 !important;
  }

  .header-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.35rem !important;        /* vertical spacing */
    padding: 0.2rem 1rem !important;
  }

  /* LOGO CONTAINER — do NOT let it grow */
  .site-branding {
    flex: 0 0 auto !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* LOGO LINK */
  .site-logo {
    display: block !important;
    line-height: normal !important;
  }

  /* LOGO IMAGE — FORCE A HEIGHT (SVG-safe) */
  .site-branding img {
    display: block !important;
    height: 42px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* GROUP SELECT */
  .group-nav {
    flex: 0 0 auto !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
  }

  .group-nav select {
    width: 85% !important;
    margin: 0 !important;
  }

  .article-full {
    padding: 1rem;
  }

  .article-title {
    font-size: 2rem;
  }

  .latest-global-articles h2 {
    font-size: 1.5rem;
  }
}




/* ======================================================
   WIREFRAME MODE
   ====================================================== */

body[data-layout="wireframe"] {

  /* Neutralize decorative elements */
  --wf-line: #888;
}

/* Invert grayscale logic for light/dark */
body[data-layout="wireframe"][data-theme="dark"] {
  --wf-line: #aaa;
}

body[data-layout="wireframe"][data-theme="light"] {
  --wf-line: #444;
}

/* Global box logic */
body[data-layout="wireframe"] .article-card,
body[data-layout="wireframe"] .article-full,
body[data-layout="wireframe"] .group-intro,
body[data-layout="wireframe"] .site-header,
body[data-layout="wireframe"] .site-footer,
body[data-layout="wireframe"] .group-name-header,
body[data-layout="wireframe"] .recent-article-list li {
  background: transparent !important;
  border: 2px solid var(--wf-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Header separators: replace gradients with lines */
body[data-layout="wireframe"] .intro-separator {
  height: 2px;
  background: var(--wf-line);
  box-shadow: none;
}

/* Buttons: sketchpen feel */
body[data-layout="wireframe"] #sticky-player button {
  background: transparent !important;
  border: 2px solid var(--wf-line);
  color: var(--wf-line);
  border-radius: 0;
}

/* Dropdown */
body[data-layout="wireframe"] .group-nav select {
  border: 2px solid var(--wf-line);
  color: inherit;
  border-radius: 0;
}

/* Footer */
body[data-layout="wireframe"] .site-footer {
  border-top: 2px solid var(--wf-line);
}

/* === Wireframe toggle button styling === */

.layout-toggle {
  cursor: pointer;
  user-select: none;
  font-size: 1.4rem;
  opacity: 0.4;
  font-weight: 400;
  transition: opacity 0.15s ease;
}
.theme-area {
  display: flex;
  align-items: center;
  gap: 12px; /* space between wireframe + theme toggle */
}


/* Active wireframe */
body[data-layout="wireframe"] .layout-toggle {
  opacity: 1;
  font-weight: 700;
}

/* Color control */
body[data-layout="default"] .layout-toggle {
  color: #777;
}

body[data-layout="wireframe"][data-theme="dark"] .layout-toggle {
  color: #fff;
}

body[data-layout="wireframe"][data-theme="light"] .layout-toggle {
  color: #000;
}
















/* ======================================================
   OVERRIDE — LUMBUNG PIRATE RADIO UI
   Winamp / Activist / Broadcast Bulletin
   ====================================================== */

/* -------------------------------
   COLOR SYSTEM (signal-driven)
-------------------------------- */
:root {
  --signal-pink: #ff00aa;
  --signal-green: #00ff66;
  --signal-yellow: #ffcc00;
  --signal-orange: #ff6600;
}

/* Dark = main identity */
body[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #e6e6e6;
  --text-light: #9a9a9a;
}

/* Light = printed bulletin */
body[data-theme="light"] {
  --bg: #f3f1ec;
  --text: #000;
  --text-light: #333;
}

/* -------------------------------
   GLOBAL SHAPE: kill modern UI
-------------------------------- */
* {
  border-radius: 0 !important;
}

.article-card,
.article-full,
.group-intro,
.recent-article-list li,
.group-article-card {
  background: transparent !important;
  box-shadow: none !important;
  border: 2px solid currentColor !important;
}

/* -------------------------------
   TYPOGRAPHY: manifesto + system
-------------------------------- */
h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.latest-global-articles h2,
.group-name-header h2 {
  font-size: 1.1rem;
  color: var(--signal-pink);
}

/* -------------------------------
   SEPARATORS = spectrum / tape
-------------------------------- */
.intro-separator {
  height: 3px !important;
  background:
    repeating-linear-gradient(
      90deg,
      var(--signal-pink),
      var(--signal-pink) 10px,
      transparent 10px,
      transparent 18px
    );
  box-shadow: none !important;
}

/* -------------------------------
   BACKGROUND NOISE (critical)
-------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.25'/%3E%3C/svg%3E");
}

body[data-layout="wireframe"]::before {
  display: none;
}

/* Lift content above noise */
.site-container,
.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

/* -------------------------------
   HEADER = SOFTWARE STATUS BAR
-------------------------------- */
.site-header {
  border-bottom: 2px solid currentColor;
}

.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background:
    linear-gradient(
      to right,
      var(--signal-green),
      var(--signal-yellow),
      var(--signal-orange),
      var(--signal-pink),
      transparent
    );
}

/* -------------------------------
   PLAYER = WINAMP DNA
-------------------------------- */
#sticky-player {
  border: 2px solid var(--signal-green);
  background: #000;
}

#sticky-player strong {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--signal-green);
}

#sticky-player button {
  background: #000 !important;
  color: var(--signal-green) !important;
  border: 2px solid var(--signal-green) !important;
  font-family: monospace;
}

#sticky-player button:hover {
  background: var(--signal-green) !important;
  color: #000 !important;
}

/* -------------------------------
   NAV / DROPDOWN = SYSTEM UI
-------------------------------- */
.group-nav select {
  background: transparent !important;
  border: 2px solid currentColor !important;
  font-family: monospace;
  text-transform: uppercase;
}

/* -------------------------------
   CALENDAR = MACHINE FEED
-------------------------------- */
.latest-global-articles > div {
  border: 3px solid var(--signal-orange);
  background: #000;
}

body[data-theme="light"] .latest-global-articles > div {
  background: #fff;
}

.latest-global-articles > div::before {
  content: "/// LIVE TRANSMISSION GRID";
  display: block;
  padding: 6px 10px;
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  border-bottom: 2px solid currentColor;
  color: var(--signal-orange);
}

/* -------------------------------
   LATEST ARTICLES = BULLETIN
-------------------------------- */
.recent-article-list li {
  border-left: 6px solid var(--signal-pink);
}

.recent-article-list-title {
  color: var(--signal-pink);
  font-family: monospace;
}

/* -------------------------------
   GROUP CARDS = INFRA BLOCKS
-------------------------------- */
.group-article-card {
  border-style: dashed !important;
}

.group-name {
  color: var(--signal-green) !important;
}

/* -------------------------------
   FOOTER = ZINE SIGNATURE
-------------------------------- */
.site-footer {
  border-top: 2px solid currentColor;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
