
:root{
  --shh-bg:#eef4ff;
  --shh-panel:#ffffff;
  --shh-panel-2:#f6f9fe;
  --shh-border:rgba(15,23,42,.08);
  --shh-text:#0f172a;
  --shh-muted:#5b6473;
  --shh-accent:#2563eb;
  --shh-accent-2:#1d4ed8;
  --shh-white:#ffffff;
  --shh-shadow:0 18px 50px rgba(15,23,42,.16);
}

html.shdm-enabled{
  --shh-bg:#0f172a;
  --shh-panel:#111827;
  --shh-panel-2:#172033;
  --shh-border:rgba(255,255,255,.08);
  --shh-text:#f8fafc;
  --shh-muted:#cbd5e1;
  --shh-accent:#3b82f6;
  --shh-accent-2:#60a5fa;
  --shh-shadow:0 22px 60px rgba(0,0,0,.36);
}

html[data-senorh-theme="darkblue"]{
  --shh-bg:#16263d;
  --shh-panel:#1b2f4a;
  --shh-panel-2:#22395a;
  --shh-border:rgba(201,226,255,.10);
  --shh-text:#f5f9ff;
  --shh-muted:#d4e2f6;
  --shh-accent:#5b86b0;
  --shh-accent-2:#7aa0c4;
  --shh-shadow:0 22px 60px rgba(5,14,28,.38);
}

html[data-senorh-theme="orange"]{
  --shh-bg:#e7c0a0;
  --shh-panel:#efcfb7;
  --shh-panel-2:#f3d6be;
  --shh-border:rgba(141,58,5,.18);
  --shh-text:#3f1d10;
  --shh-muted:#7a5640;
  --shh-accent:#a64507;
  --shh-accent-2:#8d3a05;
  --shh-shadow:0 22px 60px rgba(96,39,7,.22);
}

html[data-senorh-theme="titanium"]{
  --shh-bg:#b9c4cf;
  --shh-panel:#d8e1e9;
  --shh-panel-2:#e9eff5;
  --shh-border:rgba(16,32,51,.12);
  --shh-text:#102033;
  --shh-muted:#4a6177;
  --shh-accent:#41627f;
  --shh-accent-2:#355775;
  --shh-shadow:0 22px 60px rgba(33,53,74,.16);
}

.shh-trigger{
  appearance:none !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  margin:0 !important;
  cursor:pointer !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-decoration:none !important;
  box-shadow:none !important;
}

.shh-pill{
  width:128px;
  height:64px;
  border-radius:999px;
  background:rgba(111,151,255,.12);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28);
}

.shh-badge{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(180deg, var(--shh-accent) 0%, var(--shh-accent-2) 100%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 26px rgba(37,99,235,.24), inset 0 1px 1px rgba(255,255,255,.18);
  color:var(--shh-white);
  font-size:24px;
  font-weight:800;
  line-height:1;
}

html.shdm-enabled .shh-pill,
html[data-senorh-theme="darkblue"] .shh-pill{ background:rgba(148,163,184,.12); }
html[data-senorh-theme="orange"] .shh-pill{ background:rgba(166,69,7,.12); }
html[data-senorh-theme="titanium"] .shh-pill{ background:rgba(65,98,127,.12); }

.shh-mobile-slot,
.shh-desktop-slot{
  display:flex !important;
  align-items:center !important;
}
.shh-mobile-slot{ margin-right:10px !important; }
.shh-desktop-slot{
  width:100% !important;
  justify-content:center !important;
  padding:18px 12px 10px !important;
}

.shh-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.shh-modal.is-open{display:flex;}
.shh-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,6,23,.38);
  backdrop-filter:blur(8px);
}
.shh-dialog{
  position:relative;
  width:min(100%, 760px);
  max-height:min(92vh, 980px);
  overflow:auto;
  background:var(--shh-bg);
  color:var(--shh-text);
  border:1px solid var(--shh-border);
  border-radius:30px;
  box-shadow:var(--shh-shadow);
  padding:18px;
}
.shh-header{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
  padding:6px 6px 18px;
}
.shh-title{
  margin:0;
  font-size:30px;
  line-height:1.1;
  font-weight:800;
  color:var(--shh-text);
}
.shh-sync-note{
  margin-top:6px;
  color:var(--shh-muted);
  font-size:13px;
  font-weight:700;
}
.shh-close{
  appearance:none;
  border:1px solid var(--shh-border);
  background:var(--shh-panel);
  color:var(--shh-text);
  min-height:48px;
  padding:0 18px;
  border-radius:18px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.shh-summary{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-bottom:12px;
}
.shh-summary-card{
  background:var(--shh-panel);
  border:1px solid var(--shh-border);
  border-radius:22px;
  padding:18px;
}
.shh-summary-number{
  font-size:32px;
  line-height:1;
  font-weight:900;
  color:var(--shh-accent);
}
.shh-summary-label{
  margin-top:8px;
  color:var(--shh-muted);
  font-size:14px;
  font-weight:700;
}
.shh-card{
  background:var(--shh-panel);
  border:1px solid var(--shh-border);
  border-radius:24px;
  padding:16px;
}
.shh-card + .shh-card{margin-top:12px;}
.shh-card-title{
  font-size:20px;
  font-weight:800;
  color:var(--shh-text);
  margin-bottom:10px;
}
.shh-list{ display:grid; gap:10px; }
.shh-item{
  display:grid;
  gap:5px;
  background:var(--shh-panel-2);
  border:1px solid var(--shh-border);
  border-radius:18px;
  padding:14px;
}
.shh-item-title{
  font-size:16px;
  font-weight:800;
  line-height:1.3;
  color:var(--shh-text);
  word-break:break-word;
}
.shh-item-meta{
  color:var(--shh-muted);
  font-size:13px;
  line-height:1.4;
}
.shh-item-link{
  color:var(--shh-accent);
  font-size:13px;
  word-break:break-all;
}
.shh-empty{
  color:var(--shh-muted);
  font-size:15px;
  line-height:1.5;
  padding:8px 2px;
}
.shh-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.shh-action{
  appearance:none;
  border:1px solid var(--shh-border);
  background:var(--shh-panel);
  color:var(--shh-text);
  min-height:46px;
  padding:0 16px;
  border-radius:16px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.shh-action--primary{
  background:var(--shh-accent);
  color:#fff;
  border-color:transparent;
}

@media (max-width: 999px){ .shh-desktop-slot{display:none !important;} }
@media (min-width: 1000px){ .shh-mobile-slot{display:none !important;} }
@media (max-width: 767px){
  .shh-modal{padding:12px;}
  .shh-dialog{ width:min(100%, 94vw); border-radius:26px; padding:14px; }
  .shh-title{font-size:24px;}
  .shh-close{min-height:44px;padding:0 14px;border-radius:16px;}
  .shh-summary-card{padding:14px;border-radius:18px;}
  .shh-summary-number{font-size:26px;}
  .shh-card{padding:14px;border-radius:20px;}
  .shh-card-title{font-size:18px;}
  .shh-item{padding:12px;border-radius:16px;}
  .shh-pill{width:108px;height:56px;}
  .shh-badge{width:40px;height:40px;border-radius:12px;font-size:22px;}
}


/* VERSION 1.1.1: rendimiento más suave */
.shh-modal[aria-hidden="true"]{
  pointer-events:none;
}


/* VERSION 1.2.0: icono cuadrado + selección individual */
.shh-pill{
  width:auto !important;
  height:auto !important;
  border-radius:0 !important;
  background:transparent !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-shadow:none !important;
}
.shh-badge{
  width:48px !important;
  height:48px !important;
  border-radius:14px !important;
  font-size:24px !important;
}
.shh-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.shh-select-all{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--shh-muted);
  font-size:13px;
  font-weight:700;
  user-select:none;
}
.shh-select-all input{
  width:16px;
  height:16px;
  accent-color:var(--shh-accent);
}
.shh-card-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}
.shh-item{
  grid-template-columns:auto 1fr;
  column-gap:10px;
  align-items:start;
}
.shh-item-check{
  margin-top:3px;
  display:flex;
  align-items:center;
}
.shh-item-check input{
  width:16px;
  height:16px;
  accent-color:var(--shh-accent);
}
.shh-item-content{
  display:grid;
  gap:5px;
  min-width:0;
}
@media (max-width: 767px){
  .shh-badge{ width:42px !important; height:42px !important; border-radius:12px !important; font-size:22px !important; }
  .shh-card-head{ align-items:flex-start; flex-direction:column; }
}


/* VERSION 1.2.1: contador blanco en Naranja Cósmico y Azul Titanium */
html[data-senorh-theme="orange"] .shh-badge,
html[data-senorh-theme="orange"] .shh-count,
html[data-senorh-theme="orange"] [data-shh-count],
html[data-senorh-theme="titanium"] .shh-badge,
html[data-senorh-theme="titanium"] .shh-count,
html[data-senorh-theme="titanium"] [data-shh-count]{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

html[data-senorh-theme="orange"] .shh-badge *,
html[data-senorh-theme="titanium"] .shh-badge *{
  color:#ffffff !important;
  fill:#ffffff !important;
  stroke:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* VERSION 1.2.6: botón historial menos dominante */
.shh-mobile-slot{margin-right:8px !important;}
.shh-desktop-slot{padding:14px 10px 8px !important;}
.shh-badge{width:42px !important;height:42px !important;border-radius:12px !important;font-size:22px !important;box-shadow:0 6px 16px rgba(37,99,235,.14), inset 0 1px 1px rgba(255,255,255,.14) !important;}
@media (max-width: 767px){.shh-badge{width:38px !important;height:38px !important;border-radius:11px !important;font-size:20px !important;box-shadow:0 4px 12px rgba(37,99,235,.12), inset 0 1px 1px rgba(255,255,255,.12) !important;}}
html[data-senorh-theme="orange"] .shh-badge{box-shadow:0 6px 16px rgba(96,39,7,.12), inset 0 1px 1px rgba(255,255,255,.12) !important;}
html[data-senorh-theme="titanium"] .shh-badge{box-shadow:0 6px 16px rgba(33,53,74,.12), inset 0 1px 1px rgba(255,255,255,.12) !important;}
html.shdm-enabled .shh-badge, html[data-senorh-theme="darkblue"] .shh-badge{box-shadow:0 6px 16px rgba(0,0,0,.18), inset 0 1px 1px rgba(255,255,255,.10) !important;}


/* VERSION 1.2.7: modal sobre footer fijo + acceso en footer móvil */
.shh-modal{z-index:2147483647 !important;}
html.shh-modal-open .amfhs-mobile-footer,
body.shh-modal-open .amfhs-mobile-footer{
  z-index:2147483000 !important;
  pointer-events:none !important;
}

@media (max-width: 768px){
  .amfhs-mobile-footer.shh-has-footer-history{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
  }

  .amfhs-mobile-footer.shh-has-footer-history .amfhs-mobile-footer__item--left{
    grid-column: 1 !important;
    justify-content: center !important;
  }

  .amfhs-mobile-footer.shh-has-footer-history .amfhs-mobile-footer__item--center{
    grid-column: 3 !important;
    justify-content: center !important;
  }

  .amfhs-mobile-footer.shh-has-footer-history .shh-footer-slot{
    grid-column: 4 !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
  }

  .amfhs-mobile-footer.shh-has-footer-history .amfhs-mobile-footer__item--right{
    grid-column: 5 !important;
    justify-content: center !important;
    padding-right: 0 !important;
  }

  .shh-trigger--footer-inline{
    min-width:42px;
    min-height:42px;
    border-radius:12px !important;
  }

  .shh-trigger--footer-inline .shh-pill{
    width:auto !important;
    height:auto !important;
    background:transparent !important;
  }

  .shh-trigger--footer-inline .shh-badge{
    width:32px !important;
    height:32px !important;
    border-radius:10px !important;
    background:#d9d9d9 !important;
    color:#000000 !important;
    font-size:16px !important;
    font-weight:800 !important;
    box-shadow:none !important;
  }

  .shh-trigger--footer-inline .shh-badge *,
  .shh-trigger--footer-inline .shh-count,
  .shh-trigger--footer-inline [data-shh-count]{
    color:#000000 !important;
    fill:#000000 !important;
    stroke:#000000 !important;
    -webkit-text-fill-color:#000000 !important;
  }
}


@media (max-width: 768px){
  .shh-mobile-slot{
    display:none !important;
  }

  .ct-header .shh-trigger--mobile,
  .site-header .shh-trigger--mobile{
    display:none !important;
  }

  .shh-footer-slot .shh-trigger--mobile,
  .amfhs-mobile-footer .shh-trigger--mobile,
  .amfhs-mobile-footer .shh-footer-slot{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
}
