/* ===============================
   HEMATOTRIALS — admin.css 
   =============================== */

:root{
  --idr-primary:#93120e;
  --idr-border:#dcdde1;
  --idr-text:#111;
  --idr-muted:#6b7280;
}

/* ===== Contenedor general ===== */
.idralev-buscador{
  background:#f3f3f3;
  padding:10px;
  border-radius:10px;
}
.idralev-buscador .idr-main{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:32px;
}

/* ===============================
   TILES SUPERIORES (3)
   =============================== */
.idr-tiles{
  display:grid;
  grid-template-columns:repeat(3, minmax(220px,1fr));
  gap:45px;
  align-items:center;
  margin-bottom:10px;
  background:#fff;
  padding:35px;
  border-radius:25px;
  box-shadow:0 1px 8px rgba(0,0,0,.1);
}
.idr-tile{
  display:grid;
  place-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--idr-border);
  border-radius:20px;
  padding:32px 0;
  cursor:pointer;
  transition:box-shadow .2s, transform .05s;
  box-shadow:0 1px 8px rgba(0,0,0,.3);
  color:var(--idr-primary);
  text-decoration:none;
}
.idr-tile i{ font-size:75px; }
.idr-tile span{ font-size:15px; font-family:Inter,system-ui,Arial; }
.idr-tile.active{
  box-shadow:0 0 0 2px var(--idr-primary) inset;
  background:var(--idr-primary)!important;
}
.idr-tile.active i,
.idr-tile.active span{ color:#fff!important; }
.idr-tile:active{ transform:scale(.99); }

/* Buscador por palabras (oculto) */
.idr-search-row{ display:none !important; }

/* ===============================
   GRILLAS DE SELECCIÓN (flujo)
   =============================== */
.idr-cards{
  display:grid;
  gap:12px;
  margin:12px 0;
}
.idr-cards.three{ grid-template-columns:repeat(3, 1fr); }
.idr-cards.four { grid-template-columns:repeat(4, 1fr); }
.idr-cards.five { grid-template-columns:repeat(5, 1fr); }

.idr-card-tile{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-height:110px;
  background:#fff;
  border:1px solid var(--idr-border);
  border-radius:12px;
  padding:16px;
  cursor:pointer;
  transition:box-shadow .15s, transform .05s, background .15s, color .15s;
  color:var(--idr-primary);
  text-decoration:none;
}
.idr-card-tile:hover{
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  transform:translateY(-1px);
  background:var(--idr-primary);
  color:#fff;
}
.idr-card-title{ font-weight:600; text-align:center; }
.idr-card-sub{ color:#ddcfcf; font-size:13px; margin-top:4px; }

.idr-selected-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:14px 0;
}
.idr-selected-chip{
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  font-weight:600;
  background:#fff;
}
.idr-back-btn{
  padding:10px 12px;
  border-radius:12px;
  background:#111827;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
}

/* ===============================
   RESULTADOS (split)
   =============================== */
.idralev-buscador .idr-results-wrap{
  background:#fff;
  border:1px solid var(--idr-primary);
  border-radius:12px;
  padding:12px;
  margin-top:8px;
}
.idr-results-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 0 10px 0;
  margin:0 0 8px 0;
}
.idr-results-bar .idr-results-count{ font-weight:600; }

.idr-results-layout{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:16px;
  align-items:start;
}
.idr-left, .idr-right{
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  overflow:hidden;
}
.idr-left{
  position:sticky;
  top:16px;
  max-height: calc(100vh - 32px);
}
.idr-trial-list{
  overflow:auto;
  max-height: calc(100vh - 120px);
}

/* Fila ensayo */
.idr-trial-row{
  width:100%;
  text-align:left;
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  background:#fff;
  border:0;
  border-bottom:1px solid #f1f1f1;
  cursor:pointer;
}
.idr-trial-row:hover{ background:#fafafa; }
.idr-trial-row.is-active{ background:#f7f7f7; }
.idr-trial-row:focus-visible{
  outline: 3px solid rgba(147,18,14,.35);
  outline-offset: 2px;
  border-radius: 12px;
}

.idr-trial-title{ font-weight:700; font-size:14px; line-height:1.2; }
.idr-trial-sub{ font-size:12px; color:#666; margin-top:2px; }
.idr-trial-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:8px;
}
.idr-trial-meta .tag{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:#f3f4f6;
}

.idr-trial-side{ display:flex; align-items:flex-start; }
.idr-phase{
  font-size:12px;
  padding:6px 10px;
  border-radius:10px;
  background:#f2dede;
  font-weight:700;
}

.idr-right{ min-height: 520px; }
.idr-right .idr-empty{ padding:18px; color:#666; }

/* ===============================
   PAGINACIÓN (botones)
   =============================== */
.idralev-buscador .idr-pagination{
  display:flex;
  gap:8px;
  justify-content:center;
  margin:16px 0 6px;
}
.idralev-buscador .idr-pagination button{
  min-width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #151515;
  border-radius:8px;
  background:#fff;
  color:#111;
  cursor:pointer;
}
.idralev-buscador .idr-pagination button.current{
  background:#93120e;
  color:#fff;
  border-color:#93120e;
}
.idralev-buscador .idr-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* ===============================
   PANEL DERECHO (trialing-like)
   =============================== */
#idrRightPanel .trialing-like{
  position: relative;
  padding: 18px 18px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f1f1f1;
  min-height: 520px;
}

/* Close */
#idrRightPanel .idr-panel-close, #idrRightPanel .idr-favs__close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Header */
#idrRightPanel .idr-panel-top{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  justify-content:space-between;
  padding-right: 52px;
}
#idrRightPanel .idr-panel-logo{
  max-height: 100%;
  width:auto;
  display:block;
  opacity: .95;
}
#idrRightPanel .idr-panel-subtitle{
  margin-top: 2px;
  color: #111;
  opacity: .85;
}

/* Accordion */
#idrRightPanel .idr-acc{
  border-top: 1px solid #eef0f3;
  padding: 0;
}
#idrRightPanel .idr-acc:first-child{ border-top:0; }
#idrRightPanel .idr-acc__sum{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-weight: 600;
  color:#111;
  padding: 10px 4px;
}
#idrRightPanel .idr-acc__sum::-webkit-details-marker{ display:none; }
#idrRightPanel .idr-acc__chev{
  opacity:.6;
  transition: transform .2s ease;
  font-size: 18px;
}
#idrRightPanel details[open] .idr-acc__chev{ transform: rotate(180deg); }
#idrRightPanel .idr-acc__body{
  padding: 0 4px 10px;
  color:#111;
}
#idrRightPanel .idr-text{ color:#111; opacity:.88; }
#idrRightPanel .idr-empty{ color:#9ca3af; }
#idrRightPanel ul{ padding: 0 20px 4px; }

/* Footer sponsor */
#idrRightPanel .idr-panel-footer{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
  color:#6b7280;
  display:flex;
  gap:10px;
  align-items:center;
}

/* ===============================
   BOTONERA (la que querés “chica y a la derecha”)
   =============================== */
#idrRightPanel .idr-panel-actionsbar{
  margin-top: 12px;
  display:flex;
  justify-content:flex-end;   
  flex-wrap:wrap;
  gap:8px;
}

/* Botones compactos */
#idrRightPanel .idr-panel-actionsbar .idr-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  justify-content:center;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
#idrRightPanel .idr-panel-actionsbar .idr-btn i{ font-size:18px; }

/* Filter */
button.primary{ background: #93120e; color: #fff; border-color: #93120e; border-radius: 10px; }
a.secondary{ background: #fff; color: #ab403d; border: 1px solid #93120e; border-radius: 10px; }

/* Hover filter */
button.primary:hover{ background: #FFF; color: #93120e; border-color: #93120e; border-radius: 10px; }
a.secondary:hover{ background: #ab403d; color: #FFF; border: 1px solid #93120e; border-radius: 10px; }

/* Variantes */
#idrRightPanel .idr-btn--wa{ border: 1px solid #10b981; background: #10b981; color: #FFF; padding:10px 15px;}
#idrRightPanel .idr-btn--live{ border: 1px solid #2ea3f2; padding:14px; background: #FFF; color: #2ea3f2;}
#idrRightPanel .idr-btn--pdf{ border: 1px solid #000; padding:14px; background: #FFF; color: #000;}
#idrRightPanel .idr-btn--fav{ border: 1px solid #f59e0b; background: #FFF; padding:12px; color: #f59e0b;}
#idrRightPanel .idr-btn--save{ border: 1px solid #93120e; background: #FFF; padding:12px 16px; color: #93120e;}

/* variantes hover*/
#idrRightPanel .idr-btn--wa:hover{ border: 1px solid #10b981; background: #FFF; color: #10b981;}
#idrRightPanel .idr-btn--live:hover{ border: 1px solid #2ea3f2; background: #2ea3f2; color: #FFF;}
#idrRightPanel .idr-btn--pdf:hover{ border: 1px solid #000; background: #000; color: #FFF;}
#idrRightPanel .idr-btn--fav:hover{ border: 1px solid #f59e0b; background: #f59e0b; color: #fff;}
#idrRightPanel .idr-btn--save:hover{ border: 1px solid #FFF; background: #93120e; color: #FFF;}

/* ===============================
   Responsive
   =============================== */
@media (max-width:1200px){
  .idr-cards.five{ grid-template-columns:repeat(4,1fr); }
}
@media (max-width:992px){
  .idr-tiles{ grid-template-columns:1fr; }
  .idr-cards.three{ grid-template-columns:repeat(2,1fr); }
  .idr-cards.four{  grid-template-columns:repeat(2,1fr); }
  .idr-cards.five{  grid-template-columns:repeat(3,1fr); }

  .idr-results-layout{ grid-template-columns: 1fr; }
  .idr-left{ position:relative; max-height:none; }
  .idr-trial-list{ max-height:none; }
}
@media (max-width:600px){
  .idr-cards.three,
  .idr-cards.four,
  .idr-cards.five{ grid-template-columns:1fr; }

  /* en móvil: botonera full width apilada */
  #idrRightPanel .idr-panel-actionsbar{
    justify-content:stretch;
  }
  #idrRightPanel .idr-panel-actionsbar .idr-btn{
    width:100%;
    border-radius:14px;
  }
}

/**/
/* Banner de login (columna izquierda) */
.idr-left .idr-login-hint{
  margin:12px;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid #f59e0b;
  background:#fff7ed;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.idr-left .idr-login-hint strong{
  font-size:13px;
  color:#7c5200;
  line-height:1.35;
}
.idr-left .idr-login-hint .idr-btn{
  background:#93120e;
  border:1px solid #93120e;
  color:#fff;
  border-radius:12px;
  padding:10px 14px;
  text-decoration:none;
  font-weight:800;
}
.idr-left .idr-login-hint .idr-btn:hover{
  opacity:.92;
}

/*/////////////////////////////////////////////*/ 
/* ===== Favorito ON (estado activo) ===== */
#idrRightPanel .idr-btn--fav.is-active{
  background: #f59e0b;
  border-color: #f59e0b;
  color: #111;
  box-shadow: 0 8px 18px rgba(245,158,11,.28);
  transform: translateY(-1px);
}

#idrRightPanel .idr-btn--fav.is-active i{
  color: #111;
}

/* opcional: hover cuando está activo */
#idrRightPanel .idr-btn--fav.is-active:hover{
  background: #d97706;
  border-color: #d97706;
}

/* estado loading */
#idrRightPanel .idr-btn.is-loading{
  opacity: .7;
  cursor: wait;
  pointer-events: none;
}

/*////////////////////////////////////////////*/
/* ===== Fila en resultados marcada como fav ===== */
.idr-trial-row.is-fav .idr-trial-title::after{
  content: "★";
  margin-left: 6px;
  font-size: 12px;
  color: #f59e0b;
}
.idr-trial-row.is-fav{
  border-left: 3px solid #f59e0b;
}

/*///////////////////////////////////////////*/
/* ===============================
   MIS FAVORITOS (panel derecho)
   =============================== */

#idrRightPanel .idr-favs{
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f1f1f1;
  overflow: hidden;
  min-height: 520px;
}

/* Header */
#idrRightPanel .idr-favs__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f3;
  background: #f1f1f1;
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Título */
#idrRightPanel .idr-favs__title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  font-size: 14px;
  font-family: Inter, system-ui, Arial;
  color: #111;
}
#idrRightPanel .idr-favs__title i{
  color: #f59e0b;
  font-size: 16px;
}

/* Contador */
#idrRightPanel .idr-favs__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 800;
  color:#111;
}

/* Cerrar */
#idrRightPanel .idr-favs__close{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color:#111;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
#idrRightPanel .idr-favs__close:hover{
  background:#f9fafb;
}

/* Estado vacío */
#idrRightPanel .idr-favs__empty{
  padding: 18px;
  color:#6b7280;
  font-size: 14px;
  line-height: 1.4;
}

/* Listado */
#idrRightPanel .idr-favs__list{
  padding: 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

/* Fila (button) */
#idrRightPanel .idr-favs__row{
  width: 100%;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  background: #e5e5e5;
  padding: 0;
  display:block;
  cursor: pointer;
  text-align: left;
}

/* Hover */
#idrRightPanel .idr-favs__row:hover{
  border-color:#e5e7eb;
  background:#fafafa;
}

/* Focus accesible */
#idrRightPanel .idr-favs__row:focus-visible{
  outline: 3px solid rgba(147,18,14,.35);
  outline-offset: 2px;
}

/* fila abierta/seleccionada */
#idrRightPanel .idr-favs__row.is-active{
  border-color: rgba(147,18,14,.25);
  box-shadow: 0 0 0 3px rgba(147,18,14,.12);
}

/* ===== Layout interno nuevo ===== */
#idrRightPanel .idr-fav-row{
  padding: 12px 12px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}

#idrRightPanel .idr-fav-row__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}

/* Título (izq) */
#idrRightPanel .idr-fav-row__title{
  font-family: Inter, system-ui, Arial;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color:#111;
}

/* Fase (der) */
#idrRightPanel .idr-fav-row__phase{
  font-size: 12px;
  font-family: Inter, system-ui, Arial;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2dede;
  font-weight: 600;
  white-space: nowrap;
  color:#111;
}

/* Bottom: hint izq + meta der */
#idrRightPanel .idr-fav-row__bottom{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 10px;
}

#idrRightPanel .idr-fav-row__hint{
  font-size: 12px;
  color:#6b7280;
}

/* Patología + enfermedad */
#idrRightPanel .idr-fav-row__meta{
  font-size: 12px;
  color:#111;
  opacity: .9;
  text-align: right;
}

/* Responsive */
@media (max-width: 992px){
  #idrRightPanel .idr-favs{ min-height: auto; }
}
