/* News module admin styling with 4 view modes.
 * Modes: panels, list, pulse, exclusive.
 */

#noesia-swa-wrapper .noesia-swa-news-wrap{
  width:100%;
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

#noesia-swa-wrapper .noesia-swa-news-view-switch{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

#noesia-swa-wrapper .noesia-swa-news-view-btn{
  min-height:38px;
  border:1px solid var(--noesia-swa-border);
  border-radius:999px;
  background:var(--noesia-swa-surface);
  color:var(--noesia-swa-text);
  padding:0 14px;
  font-weight:800;
  font-size:12px;
  letter-spacing:.04em;
  cursor:pointer;
  transition:all .18s ease;
}

#noesia-swa-wrapper .noesia-swa-news-view-btn:hover,
#noesia-swa-wrapper .noesia-swa-news-view-btn.is-active{
  background:color-mix(in srgb, var(--noesia-swa-surface) 84%, #2563eb 16%);
  border-color:#2563eb;
  color:#2563eb;
  box-shadow:0 0 0 1px rgba(37,99,235,.12);
}

#noesia-swa-wrapper .noesia-swa-news-toolbar-note{
  margin:0;
  color:var(--noesia-swa-text-muted);
  font-size:12px;
  line-height:1.5;
}

#noesia-swa-wrapper .noesia-swa-news-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

#noesia-swa-wrapper [data-noesia-swa-news-view="list"] .noesia-swa-news-grid,
#noesia-swa-wrapper [data-noesia-swa-news-view="exclusive"] .noesia-swa-news-grid{
  grid-template-columns:1fr;
}

@media (max-width:1200px){
  #noesia-swa-wrapper .noesia-swa-news-grid{grid-template-columns:1fr;}
}

#noesia-swa-wrapper .noesia-swa-news-card .noesia-swa-card-header h3{
  font-size:18px !important;
  line-height:1.12 !important;
  letter-spacing:.2px;
  font-weight:900;
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-card .noesia-swa-card-header .noesia-swa-muted{
  margin-top:4px;
}

#noesia-swa-wrapper .noesia-swa-news-list{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:12px;
}

#noesia-swa-wrapper .noesia-swa-news-item,
#noesia-swa-wrapper .noesia-swa-news-list-row,
#noesia-swa-wrapper .noesia-swa-news-pulse-shell,
#noesia-swa-wrapper .noesia-swa-news-exclusive-shell{
  list-style:none;
}

#noesia-swa-wrapper .noesia-swa-news-item{
  padding:18px 12px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);
  border-radius:18px;
  background:color-mix(in srgb, var(--noesia-swa-surface-2) 72%, var(--noesia-swa-surface));
}

#noesia-swa-wrapper .noesia-swa-news-item-inner{display:block;}

#noesia-swa-wrapper .noesia-swa-news-link,
#noesia-swa-wrapper .noesia-swa-news-list-row-link,
#noesia-swa-wrapper .noesia-swa-news-pulse-link,
#noesia-swa-wrapper .noesia-swa-news-pulse-row,
#noesia-swa-wrapper .noesia-swa-news-exclusive-hero,
#noesia-swa-wrapper .noesia-swa-news-exclusive-item{
  text-decoration:none;
  color:inherit;
}

#noesia-swa-wrapper .noesia-swa-news-link strong{
  font-size:18px;
  line-height:1.28;
  font-weight:800;
  display:block;
}

#noesia-swa-wrapper .noesia-swa-news-meta{
  margin-top:12px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

#noesia-swa-wrapper .noesia-swa-news-source,
#noesia-swa-wrapper .noesia-swa-dash-news-source{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 82%, transparent);
  background:color-mix(in srgb, var(--noesia-swa-surface-2) 82%, var(--noesia-swa-surface));
  color:var(--noesia-swa-text);
  font-weight:900;
  font-size:12px;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

#noesia-swa-wrapper .noesia-swa-news-source:hover,
#noesia-swa-wrapper .noesia-swa-dash-news-source:hover{
  border-color:color-mix(in srgb, var(--noesia-swa-accent) 34%, var(--noesia-swa-border));
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-time-badge,
#noesia-swa-wrapper .noesia-swa-dash-news-time{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:color-mix(in srgb, var(--noesia-swa-surface) 80%, #dbe7ff);
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 82%, transparent);
  color:var(--noesia-swa-text);
  font-weight:900;
  font-size:12px;
}

#noesia-swa-wrapper .noesia-swa-news-refresh{min-width:34px;padding:0 10px;}

/* List mode */
#noesia-swa-wrapper .noesia-swa-news-list-row-link{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding:14px 16px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);
  border-radius:18px;
  background:var(--noesia-swa-surface);
}

#noesia-swa-wrapper .noesia-swa-news-list-row-index{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:color-mix(in srgb, var(--noesia-swa-surface-2) 75%, var(--noesia-swa-surface));
  font-weight:900;
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-list-row-copy strong{
  display:block;
  font-size:17px;
  line-height:1.26;
}

/* Pulse mode */
#noesia-swa-wrapper .noesia-swa-news-pulse-shell{
  display:grid;
  gap:14px;
}

#noesia-swa-wrapper .noesia-swa-news-pulse-hero{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-news-accent) 36%, transparent);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--noesia-swa-news-accent) 28%, transparent), transparent 44%),
    linear-gradient(145deg, color-mix(in srgb, var(--noesia-swa-surface) 92%, var(--noesia-swa-news-accent) 8%), color-mix(in srgb, var(--noesia-swa-surface-2) 88%, var(--noesia-swa-news-accent) 12%));
  padding:24px;
  box-shadow:0 18px 40px rgba(0,0,0,.10);
}

#noesia-swa-wrapper .noesia-swa-news-pulse-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  background:var(--noesia-swa-news-accent);
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

#noesia-swa-wrapper .noesia-swa-news-pulse-link strong{
  display:block;
  margin-top:14px;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-.02em;
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-pulse-stack{
  display:grid;
  gap:10px;
}

#noesia-swa-wrapper .noesia-swa-news-pulse-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);
  background:color-mix(in srgb, var(--noesia-swa-surface) 84%, var(--noesia-swa-news-accent) 16%);
}

#noesia-swa-wrapper .noesia-swa-news-pulse-row-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:16px;
  background:color-mix(in srgb, var(--noesia-swa-news-accent) 18%, var(--noesia-swa-surface));
  color:var(--noesia-swa-text);
  font-weight:900;
  font-size:14px;
}

#noesia-swa-wrapper .noesia-swa-news-pulse-row-title{
  display:block;
  font-size:16px;
  line-height:1.28;
  font-weight:800;
  color:var(--noesia-swa-text);
}

/* Exclusive mode */
#noesia-swa-wrapper .noesia-swa-news-exclusive-shell{
  display:grid;
  gap:16px;
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-hero{
  display:block;
  padding:28px 28px 24px;
  border-radius:28px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-news-accent) 36%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--noesia-swa-surface) 98%, var(--noesia-swa-news-accent) 2%), color-mix(in srgb, var(--noesia-swa-surface-2) 86%, var(--noesia-swa-news-accent) 14%));
  box-shadow:0 18px 44px rgba(0,0,0,.10);
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:var(--noesia-swa-news-accent);
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-hero strong{
  display:block;
  margin-top:16px;
  font-size:34px;
  line-height:1.04;
  letter-spacing:-.03em;
  color:var(--noesia-swa-text);
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-groups{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-item{
  display:block;
  padding:16px 16px 14px;
  border-radius:20px;
  border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);
  background:var(--noesia-swa-surface);
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-item-kicker{
  display:block;
  margin-bottom:8px;
  color:var(--noesia-swa-news-accent);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

#noesia-swa-wrapper .noesia-swa-news-exclusive-item-title{
  display:block;
  font-size:16px;
  line-height:1.24;
  font-weight:800;
  color:var(--noesia-swa-text);
}

@media (max-width:900px){
  #noesia-swa-wrapper .noesia-swa-news-exclusive-groups{grid-template-columns:1fr;}
  #noesia-swa-wrapper .noesia-swa-news-exclusive-hero strong{font-size:28px;}
  #noesia-swa-wrapper .noesia-swa-news-pulse-link strong{font-size:24px;}
}

/* Placeholder */
#noesia-swa-wrapper .noesia-swa-news-item--placeholder{
  padding:18px 16px;
  border-radius:18px;
  border:1px dashed color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);
  background:color-mix(in srgb, var(--noesia-swa-surface-2) 76%, var(--noesia-swa-surface));
  color:var(--noesia-swa-text-muted);
}

/* Dashboard pulse kept stable */
#noesia-swa-dashboard-news-slot{margin-top:14px;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-card{border:1px solid rgba(0,0,0,0.08);border-radius:0;background:transparent;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-grid{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:0;align-items:stretch;}
@media (max-width:1200px){#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:782px){#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-grid{grid-template-columns:1fr;}}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-col{padding:16px 16px 18px;border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);border-radius:22px;background:var(--noesia-swa-surface);min-height:520px;display:flex;flex-direction:column;justify-content:flex-start;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-col-title{font-weight:950;font-size:14px;color:var(--noesia-swa-text);margin:0 0 10px;letter-spacing:.2px;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-item{display:block;text-decoration:none;color:inherit;padding:10px;border-radius:18px;border:1px solid color-mix(in srgb, var(--noesia-swa-border) 72%, transparent);background:var(--noesia-swa-surface);margin-bottom:10px;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-title{font-weight:950;font-size:17px;line-height:1.28;color:var(--noesia-swa-text);} 
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-meta{margin-top:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;}
#noesia-swa-dashboard-news-slot .noesia-swa-dash-news-empty{opacity:.75;padding:10px 2px;color:var(--noesia-swa-text);}

/* Theme-specific contrast for pulse in dark and black */
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-pulse-hero,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-pulse-hero{
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--noesia-swa-news-accent) 38%, transparent), transparent 42%),
    linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-color:rgba(255,255,255,.12);
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-pulse-link strong,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-pulse-link strong,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-pulse-row-title,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-pulse-row-title,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-exclusive-hero strong,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-exclusive-hero strong,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-exclusive-item-title,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-exclusive-item-title{
  color:#f7f7f8;
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-pulse-row,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-pulse-row,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-exclusive-item,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-exclusive-item{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.10);
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-pulse-row-index,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-pulse-row-index{
  background:rgba(255,255,255,.08);
  color:#fff;
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-time-badge,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-time-badge,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-dash-news-time,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-dash-news-time{
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.12);
  color:#f4f4f5;
}

.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-card .noesia-swa-card-header h3,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-card .noesia-swa-card-header h3,
.noesia-swa-admin-wrap.noesia-swa-theme-minimal #noesia-swa-wrapper .noesia-swa-news-card .noesia-swa-card-header h3{
  color:var(--noesia-swa-text);
}


.noesia-swa-admin-wrap.noesia-swa-theme-graphite #noesia-swa-wrapper .noesia-swa-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-graphite #noesia-swa-wrapper .noesia-swa-dash-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-dark #noesia-swa-wrapper .noesia-swa-dash-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-black #noesia-swa-wrapper .noesia-swa-dash-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-minimal #noesia-swa-wrapper .noesia-swa-news-source,
.noesia-swa-admin-wrap.noesia-swa-theme-minimal #noesia-swa-wrapper .noesia-swa-dash-news-source{
  background:color-mix(in srgb, var(--noesia-swa-surface-2) 88%, var(--noesia-swa-surface));
  border-color:color-mix(in srgb, var(--noesia-swa-border) 84%, rgba(255,255,255,.18));
  color:var(--noesia-swa-text);
  box-shadow:0 8px 18px rgba(0,0,0,.16);
}
