/*
 * RadioMeteo 2027 — 2.2.7 visual integration for Companion 1.6.80.
 * Presentation ONLY. No changes to widget HTML, values, caches, links,
 * accessibility text, JavaScript, REST routes, cron or the plugin files.
 * The selectors are scoped to this theme's homepage or internal pages.
 */
:root {
  --rm27-widget-ink: #092b4a;
  --rm27-widget-dark: #081e36;
  --rm27-widget-navy: #10395b;
  --rm27-widget-cyan: #05c7e0;
  --rm27-widget-border: #c8e3f0;
  --rm27-widget-muted: #547087;
  --rm27-widget-light: #f0f8fc;
}

/* Uniform container geometry and identical visual hierarchy for EVERY
 * active widget; do not color the first widget differently by position. */
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget {
  display:flex;
  flex-direction:column;
  gap:0;
  min-width:0;
  width:auto;
  padding:0 19px 19px!important;
  margin:0!important;
  background:linear-gradient(180deg,#fff,#f9fcff)!important;
  color:var(--rm27-widget-ink)!important;
  border:1px solid var(--rm27-widget-border)!important;
  border-top:4px solid var(--rm27-widget-cyan)!important;
  border-radius:15px!important;
  box-shadow:0 8px 25px #07385a13!important;
  overflow:hidden;
}
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > h2,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > h3,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > .wp-block-heading,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > .wp-block-group > h2:first-child {
  background:linear-gradient(105deg,#071e37 0%,#104a6a 100%)!important;
  color:#fff!important;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1.27!important;
  letter-spacing:-.025em!important;
  border:0!important;
  border-radius:0!important;
  padding:17px 19px!important;
  margin:0 -19px 18px!important;
  box-shadow:none!important;
}
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget a,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget .rmc-widget-foot a,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget .all-activations {
  color:#006b9e!important;
  font-weight:800;
  text-underline-offset:3px;
}
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget a:hover {
  color:#02466f!important;
}
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget a:focus-visible,
main.rm2027-home .rm2027-home-widgets > .sidebar > .widget button:focus-visible {
  outline:3px solid #00d5ee;
  outline-offset:3px;
}
/* Contest feed: readable rows and date-emphasis in the same navy/cyan palette. */
main.rm2027-home .rm2027-home-widgets .rmc-widget-box {
  display:flex;
  flex-direction:column;
  gap:0;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .rmc-widget-kicker {
  color:var(--rm27-widget-muted)!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.085em!important;
  margin-bottom:8px;
}
main.rm2027-home .rm2027-home-widgets .mini-event {
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:13px 0;
  border:0;
  border-bottom:1px solid #e1edf4;
  background:transparent!important;
  color:var(--rm27-widget-ink)!important;
  text-decoration:none;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .mini-event .date-box {
  padding:7px 3px;
  border-radius:10px;
  border:1px solid #cae4ef;
  background:#e9f7fc;
  color:#006c98;
  font-weight:850;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .mini-event .date-box strong {
  font-size:25px;
  line-height:1;
  color:#006c98;
}
main.rm2027-home .rm2027-home-widgets .mini-event h3 {
  font-size:14px!important;
  font-weight:800;
  line-height:1.35;
  margin:0 0 5px;
  color:var(--rm27-widget-ink)!important;
  overflow-wrap:anywhere;
}
main.rm2027-home .rm2027-home-widgets .mini-event small {
  font-size:12px!important;
  color:var(--rm27-widget-muted)!important;
  line-height:1.3;
}
main.rm2027-home .rm2027-home-widgets .rmc-widget-foot {
  margin-top:auto;
  padding-top:15px;
  border-top:1px solid #e1edf4;
  font-size:12px!important;
  align-items:center;
  flex-wrap:wrap;
}
/* Propagation: color and spacing, NOT the values or status colors. */
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-card {
  color:var(--rm27-widget-ink);
  gap:14px;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-head {
  padding-bottom:12px;
  border-bottom:1px solid #e1edf4;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-head strong {
  color:var(--rm27-widget-ink)!important;
  font-size:16px!important;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-best {
  padding:14px;
  border:1px solid #cbe3ee;
  border-radius:11px;
  background:#edf8fc;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-chip {
  border:1px solid #d6e7ee;
  border-radius:999px;
  background:#fff;
  min-height:27px;
  padding:5px 8px;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-metrics > div {
  padding:12px;
  background:#fff;
  border:1px solid #d9eaf2;
  border-radius:10px;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-metrics span {
  color:#5a748b;
  font-size:10px;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-metrics strong {
  font-size:17px;
  color:var(--rm27-widget-ink);
  white-space:normal;
  overflow-wrap:anywhere;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-note {
  padding:12px;
  border:1px solid #e9d8aa;
  border-left:4px solid #e3ab3c;
  border-radius:9px;
  background:#fffaf0;
  color:#665332!important;
  font-size:12px;
  line-height:1.5;
}
/* Preserve scientific status colors and fill bars; only frame the chart. */
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-bands {
  padding:13px;
  border:1px solid #d9eaf2;
  border-radius:11px;
  background:#f8fcff;
}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-track {background:#e0eaf1}
/* Upcoming activations: same title and readable, calm rows. */
main.rm2027-home .rm2027-home-widgets .rm-home-activations ul {margin:0;padding:0;list-style:none}
main.rm2027-home .rm2027-home-widgets .rm-home-activations li {
  padding:13px 0;
  border-bottom:1px solid #e1edf4;
  background:transparent!important;
}
main.rm2027-home .rm2027-home-widgets .rm-home-activations li strong {
  color:var(--rm27-widget-ink);
  font-size:14px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
main.rm2027-home .rm2027-home-widgets .rm-home-activations li small {
  color:var(--rm27-widget-muted);
  font-size:12px;
  line-height:1.5;
}
main.rm2027-home .rm2027-home-widgets .rm-home-activations .all-activations {
  margin-top:auto;
  padding-top:17px;
  font-size:13px;
}
/* Optional other Companion widgets in same sidebar: webcam, forecast, DX. */
main.rm2027-home .rm2027-home-widgets .rmc-dx-row,
main.rm2027-home .rm2027-home-widgets .rmc-fc-compact__day {
  background:#f5fbff;
  border:1px solid #d9eaf2;
  border-radius:10px;
}
main.rm2027-home .rm2027-home-widgets .rmc-dx-tabs button.is-active {
  background:#046d94;
  color:#fff;
  border-color:#046d94;
}
main.rm2027-home .rm2027-home-widgets .rmc-webcam img {border-radius:11px}
main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-card,
main.rm2027-home .rm2027-home-widgets .rmc-widget-box,
main.rm2027-home .rm2027-home-widgets .rmc-webcam,
main.rm2027-home .rm2027-home-widgets .wp-block-group {max-width:100%;min-width:0}
/* Cautious, cosmetic-only treatment of Companion output on INTERNAL pages. */
body:not(.home) .sidebar > .widget {
  border:1px solid #cce2ef;
  border-top:3px solid var(--rm27-widget-cyan);
  border-radius:14px;
  background:#fff;
  box-shadow:0 6px 20px #083c5b10;
}
body:not(.home) .sidebar > .widget > h2,
body:not(.home) .sidebar > .widget > h3 {
  background:#092a49;
  color:#fff;
  border-radius:9px;
  padding:13px 15px;
  margin:0 0 15px;
  font-size:17px;
}
body:not(.home) :is(.rmc-calendar .event-card,.rmc-activation-card,.rmprop-card) {
  border-color:#d2e6f0;
  border-radius:13px;
  box-shadow:0 6px 18px #083c5b0c;
}
/* Never restyle third-party map tile grids, active state logic, SVG colors,
 * the weather metric quality scale, or any modal's fixed positioning. */
@media (max-width:550px){
  main.rm2027-home .rm2027-home-widgets > .sidebar > .widget {padding:0 15px 16px!important}
  main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > h2,
  main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > h3,
  main.rm2027-home .rm2027-home-widgets > .sidebar > .widget > .wp-block-heading {
    margin:0 -15px 15px!important;
    padding:15px!important;
  }
  main.rm2027-home .rm2027-home-widgets .rmc-prop-widget-metrics strong {font-size:15px}
}

/* RadioMeteo home: the THIRD live-service card uses the EXISTING Companion DX widget.
   Presentation only; all filters, spot data, JS updates and public source credits
   still belong to Companion. No new colors or fixed widths. */
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx {
  width:100%;
  max-width:100%;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-search input {
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-main,
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-meta {
  min-width:0;
  flex-wrap:wrap;
}
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-row {
  min-width:0;
}
main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-foot {
  margin-top:auto;
}
@media (min-width:321px) and (max-width:520px) {
  /* Companion's 3-column UTC/local/refresh display fits normal smartphones;
     preserve the single-column fallback on very narrow devices. */
  main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-timebox {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width:320px) {
  main.rm2027-home .rm2027-home-widgets .rm2027-home-cluster-widget .rmc-dx-timebox {
    grid-template-columns:minmax(0,1fr);
  }
}
