/* =====================================================
   PALETTE (Sovos / Mosaic)
===================================================== */
:root{
  --navy:#072448;
  --navy-2:#1f2f5c;
  --accent:#ff4f1f;
  --ok:#22c55e;
  --deg:#f59e0b;
  --part:#f97316;
  --maj:#ef4444;
  --maint:#3b82f6;
  --na:#d1d5db;
  --ink:#1e293b;
  --muted:#64748b;
  --hint:#94a3b8;
  --line:#e2e8f0;
  --surface:#f8fafc;
}

/* Status banner */
.page-status{
  max-width:1120px;
  margin:0 auto 16px !important;
  padding-left:24px;
  padding-right:24px;
  box-sizing:border-box;
  display:block !important;
}

/* Active incidents */
.unresolved-incidents{
  max-width:1120px;
  margin:0 auto 16px !important;
  padding-left:24px;
  padding-right:24px;
  box-sizing:border-box;
}

/* Past incidents — centred when moved after widget */
.past-incidents-list{
  max-width:1120px;
  margin:32px auto 0 !important;
  padding-left:24px;
  padding-right:24px;
  box-sizing:border-box;
}

/* =====================================================
   HEADER
===================================================== */
.sps-header{
  background:linear-gradient(135deg,#131e3a 0%,#1a2b52 50%,#1f3260 100%);
  box-shadow:0 4px 20px rgba(0,0,0,.18);
  position:relative;
}
.sps-header::after{
  content:'';
  position:absolute; bottom:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg,var(--accent) 0%,#ff6b3d 40%,var(--accent) 100%);
}
.sps-header-inner{
  max-width:1120px; margin:0 auto; padding:22px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.sps-brand{ display:flex; align-items:center; gap:16px; }
.sps-logo img{ height:36px; display:block; }
.sps-divider{ width:1px; height:28px; background:rgba(255,255,255,.2); }
.sps-subtitle{ font-size:15px; font-weight:500; color:rgba(255,255,255,.75); letter-spacing:.03em; }

/* =====================================================
   WIDGET WRAPPER
===================================================== */
.sps-wrap{
  max-width:1120px;
  margin:24px auto 32px;
  padding:0 24px;
  box-sizing:border-box;
  color:var(--ink);
  font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
}

/* Legend */
.sps-legend-card{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 18px 12px; margin-bottom:14px; }
.sps-legend-title{ font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.sps-legend{ display:flex; flex-wrap:wrap; gap:10px; font-size:13px; font-weight:500; }
.sps-legend > span{ display:inline-flex; align-items:center; gap:6px; background:#fff; padding:5px 12px; border-radius:999px; border:1px solid var(--line); }

/* Search bar */
.sps-search-wrap{ margin-bottom:14px; position:relative; }
.sps-search{
  width:100% !important;
  display:block !important;
  padding:14px 16px 14px 44px !important;
  font-size:15px !important;
  font-weight:500;
  color:var(--ink) !important;
  background-color:var(--surface) !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:14px center !important;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  outline:none !important;
  transition:border-color .2s, box-shadow .2s;
  box-sizing:border-box !important;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  height:auto !important;
  line-height:1.4 !important;
  min-height:48px !important;
}
.sps-search::placeholder{ color:var(--hint) !important; font-weight:400; }
.sps-search:focus{ border-color:var(--navy) !important; box-shadow:0 0 0 3px rgba(7,36,72,.08) !important; }
.sps-no-results{
  text-align:center;
  padding:24px 16px;
  font-size:14px;
  color:var(--hint);
  font-style:italic;
  display:none;
}

/* Summary + hint */
.sps-summary{ display:flex; flex-wrap:wrap; gap:14px; margin-bottom:14px; font-size:12px; font-weight:600; color:var(--muted); }
.sps-summary-item{ display:inline-flex; align-items:center; gap:5px; }
.sps-summary-count{ font-size:16px; font-weight:800; color:var(--ink); }
.sps-summary-count.issues{ color:var(--maj); }
.sps-hint{ display:flex; align-items:center; gap:6px; margin-bottom:18px; font-size:13px; color:var(--hint); font-style:italic; }

/* Status dot + label */
.sps-dot{ width:11px; height:11px; border-radius:50%; display:inline-block; flex:0 0 auto; }
.sps-dot.ok{ background:var(--ok); }
.sps-dot.deg{ background:var(--deg); }
.sps-dot.part{ background:var(--part); }
.sps-dot.maj{ background:var(--maj); }
.sps-dot.maint{ background:var(--maint); }
.sps-dot.na{ background:var(--na); }
.sps-status{ display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--muted); }

/* Category */
.sps-cat{ margin-bottom:18px; }
.sps-cat-head{ font-size:13px; font-weight:700; color:var(--muted); margin:0 0 8px 2px; }
.sps-group{ border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 4px 16px rgba(0,0,0,.05); overflow:hidden; }

/* Product row */
.sps-prod{ border-bottom:1px solid var(--line); }
.sps-prod:last-child{ border-bottom:none; }
.sps-prod-row{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:13px 16px; background:none; border:none; cursor:pointer; font:inherit; text-align:left; color:var(--ink); }
.sps-prod-row:hover{ background:#eef2ff; }
.sps-prod-name{ display:inline-flex; align-items:center; gap:8px; font-size:15px; font-weight:600; }
.sps-chev{ width:14px; height:14px; color:var(--hint); transition:transform .2s; }
.sps-prod.open .sps-chev{ transform:rotate(90deg); }

/* Markets */
.sps-markets{ background:var(--surface); border-top:1px solid var(--line); padding:4px 0; }
.sps-prod:not(.open) .sps-markets{ display:none; }
.sps-mkt{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 16px 8px 38px; font-size:13px; color:var(--muted); }
.sps-mkt.sps-hidden{ display:none !important; }

/* Footer */
.sps-updated{ display:flex; align-items:center; gap:6px; margin-top:12px; font-size:12px; color:var(--hint); font-weight:500; }
.sps-updated-dot{ width:8px; height:8px; border-radius:50%; background:var(--ok); }
.sps-foot{ margin-top:20px; padding-top:16px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; font-size:12px; color:var(--hint); }
.sps-foot a{ color:var(--accent); text-decoration:none; font-weight:600; }
.sps-foot a:hover{ text-decoration:underline; }

/* =====================================================
   HIDE STATUSPAGE'S NATIVE COMPONENT LIST
===================================================== */
.components-section,
.component-group{ display:none !important; }

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width:768px){
  .sps-header-inner{ flex-direction:column; gap:14px; padding:18px 16px; }
  .sps-logo img{ height:30px; }
  .sps-wrap{ padding:0 16px; }
  .page-status{ padding-left:16px; padding-right:16px; }
  .unresolved-incidents{ padding-left:16px; padding-right:16px; }
  .past-incidents-list{ padding-left:16px; padding-right:16px; }
  .sps-search{ padding:12px 14px 12px 40px !important; font-size:14px !important; min-height:44px !important; }
}
@media (max-width:600px){
  .sps-prod-name{ font-size:14px; }
  .sps-group{ box-shadow:none; }
}
@media (max-width:480px){
  .sps-divider, .sps-subtitle{ display:none; }
}

/* =====================================================
   SUBSCRIBE BUTTON (header)
===================================================== */
#sps-subscribe-slot{ display:flex; align-items:center; }
.sps-subscribe{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 20px;
  font-size:14px;
  font-weight:600;
  color:#fff;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25);
  border-radius:8px;
  text-decoration:none;
  letter-spacing:.02em;
  cursor:pointer;
  transition:background .2s, border-color .2s;
  white-space:nowrap;
}
.sps-subscribe:hover{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.4);
  color:#fff;
  text-decoration:none;
}

/* =====================================================
   FLAG EMOJI (next to market names)
===================================================== */
.sps-flag{ font-size:16px; vertical-align:middle; margin-right:4px; line-height:1; }
/* =====================================================
   SUBSCRIBE BUTTON — native Statuspage override
===================================================== */
#replace-with-subscribe{ display:flex; align-items:center; }
.updates-dropdown-container .show-updates-dropdown{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 20px;
  font-size:14px;
  font-weight:600;
  color:#fff !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.25) !important;
  border-radius:8px !important;
  text-decoration:none !important;
  letter-spacing:.02em;
  cursor:pointer;
  transition:background .2s, border-color .2s;
  white-space:nowrap;
}
.updates-dropdown-container .show-updates-dropdown:hover{
  background:rgba(255,255,255,.22) !important;
  border-color:rgba(255,255,255,.4) !important;
  color:#fff !important;
  text-decoration:none !important;
}

/* =====================================================
   GOOGLE TRANSLATE WIDGET
===================================================== */
.sps-header-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

#google_translate_element{
  display:inline-flex;
  align-items:center;
}

/* Hide Google Translate top banner */
.goog-te-banner-frame.skiptranslate{
  display:none !important;
}
body{
  top:0px !important;
}

/* Hide branding */
.goog-te-gadget{
  font-size:0 !important;
  color:transparent !important;
  white-space:nowrap;
  margin:0 !important;
  padding:0 !important;
}
.goog-te-gadget > span,
.goog-te-gadget > a,
.goog-logo-link,
#goog-gt-tt{
  display:none !important;
}

/* Style dropdown to match header theme */
.goog-te-gadget .goog-te-combo{
  font-size:13px !important;
  font-weight:500 !important;
  font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif !important;
  color:rgba(255,255,255,.85) !important;
  background-color:rgba(255,255,255,.1) !important;
  border:1px solid rgba(255,255,255,.2) !important;
  border-radius:8px !important;
  padding:7px 30px 7px 10px !important;
  margin:0 !important;
  cursor:pointer !important;
  outline:none !important;
  transition:background .2s, border-color .2s !important;
  -webkit-appearance:none !important;
  -moz-appearance:none !important;
  appearance:none !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 10px center !important;
}
.goog-te-gadget .goog-te-combo:hover{
  background-color:rgba(255,255,255,.18) !important;
  border-color:rgba(255,255,255,.35) !important;
}
.goog-te-gadget .goog-te-combo option{
  color:#1e293b !important;
  background:#fff !important;
  font-size:13px !important;
}

/* Responsive adjustments for translate widget */
@media(max-width:768px){
  .sps-header-actions{
    gap:8px;
  }
  .goog-te-gadget .goog-te-combo{
    font-size:12px !important;
    padding:6px 26px 6px 8px !important;
  }
}

/* =====================================================
   [NUEVO] ANTI-FLICKER — Persistencia Google Translate
===================================================== */
body.notranslate-pending{
  opacity:0;
  transition:opacity 0.4s ease;
}
body.notranslate-ready{
  opacity:1;
  transition:opacity 0.4s ease;
}
body.sps-retranslating{
  opacity:0.92;
  transition:opacity 0.15s ease;
}