/* UrbanHoff v9.25.85 · Búsquedas → Telegram automático + responsive
   Solo UI. No modifica cálculos ni módulos protegidos. */

/* Estado claro de automatización al guardar una búsqueda. */
.uhtg-auto-rule{display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,1.25fr);gap:14px;align-items:center;padding:12px 13px;border:1px solid #cfe0f2;border-radius:12px;background:linear-gradient(180deg,#f7fbff,#f1f7fd)}
.uhtg-auto-rule>div:first-child{display:grid;gap:4px}.uhtg-auto-rule strong{font-size:12px;color:#173a60}.uhtg-auto-rule small{font-size:10.5px;line-height:1.45;color:#65778c}
.uhtg-pref-grid{display:grid;grid-template-columns:1fr 1fr minmax(126px,.7fr) auto;gap:8px;align-items:center}.uhtg-pref-grid>label:not(.uhtg-threshold){min-height:38px;display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid #d7e2ed;border-radius:9px;background:#fff;font-size:10.5px;font-weight:700;color:#304963}.uhtg-pref-grid input{width:16px;height:16px;accent-color:#2f6fd8}.uhtg-threshold{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:10.5px;font-weight:700;color:#40556d}.uhtg-threshold select{min-width:72px;height:38px;border:1px solid #cbd7e3;border-radius:9px;background:#fff;color:#1d3552;padding:0 8px}.uhtg-pref-grid button{min-height:38px;white-space:nowrap}
.uhtg-test-ok{color:#246c9d!important;font-weight:700!important;background:#eaf5ff;border:1px solid #c9e3f7;border-radius:999px;padding:4px 7px;opacity:1!important}
.uhs-auto-toast{position:fixed;right:20px;bottom:20px;z-index:260;width:min(430px,calc(100vw - 30px));display:grid;gap:3px;padding:13px 15px;border:1px solid #b8ddc8;border-radius:13px;background:#f1fbf5;color:#195c38;box-shadow:0 18px 46px rgba(14,39,65,.16);opacity:0;transform:translateY(10px);transition:.2s ease;pointer-events:none}.uhs-auto-toast.show{opacity:1;transform:none}.uhs-auto-toast strong{font-size:12px}.uhs-auto-toast span{font-size:10.5px;line-height:1.4}.uhs-auto-toast.warn{border-color:#ecd49e;background:#fff8e9;color:#805715}

/* Barra lateral completa y acciones inferiores con la misma presencia en claro y oscuro. */
@media(min-width:901px){
  .sidebar{height:100dvh!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
  .sidebar .side-bottom{position:sticky;bottom:0;z-index:5;margin-top:auto!important;padding:9px 0 max(8px,env(safe-area-inset-bottom));background:inherit}
  body:not(.dark-mode) .sidebar .side-icon-btn{width:54px!important;height:54px!important;background:#263d54!important;color:#fff!important;border:1px solid #385775!important;box-shadow:0 5px 14px rgba(20,48,76,.10)}
  body:not(.dark-mode) .sidebar .side-icon-btn:hover{background:#315a82!important;color:#fff!important;border-color:#46729b!important}
  body:not(.dark-mode) .sidebar .side-icon-btn svg{stroke:currentColor!important}
}

body.dark-mode .uhtg-auto-rule{background:linear-gradient(180deg,#13283e,#102238);border-color:#365875}.dark-mode .uhtg-auto-rule strong{color:#eaf4ff}.dark-mode .uhtg-auto-rule small{color:#9fb3c8}.dark-mode .uhtg-pref-grid>label:not(.uhtg-threshold),.dark-mode .uhtg-threshold select{background:#0f2032;border-color:#36516c;color:#e9f1fa}.dark-mode .uhtg-threshold{color:#bdd0e2}.dark-mode .uhtg-test-ok{background:#17364f;border-color:#315b79;color:#b9e2ff!important}.dark-mode .uhs-auto-toast{background:#123023;border-color:#2d694a;color:#c8f2d9}.dark-mode .uhs-auto-toast.warn{background:#342c19;border-color:#675933;color:#ffe1a1}

/* iPad / tablet: mantener todo utilizable sin barras horizontales. */
@media(max-width:1180px){
  .uhtg-modal{width:min(920px,calc(100vw - 24px))!important}
  .uhtg-auto-rule{grid-template-columns:1fr}.uhtg-pref-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.uhtg-pref-grid button{width:100%}
  .uhtg-search-row{align-items:flex-start}.uhtg-search-row>div:last-child{justify-content:flex-end}
  .uhs-shell,.uhpa-panel{max-width:100%!important;overflow-x:hidden}
}

/* iPhone / teléfono: controles grandes, una columna y respeto de safe areas. */
@media(max-width:720px){
  .modal-back{padding:5px!important;align-items:stretch!important}
  .uhtg-modal{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 10px)!important;border-radius:14px!important;padding:14px!important;margin:auto 0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .uhtg-modal .modal-head{position:sticky;top:-14px;z-index:10;margin:-14px -14px 8px;padding:14px;background:var(--panel,#fff);border-bottom:1px solid var(--line,#dfe6ee)}
  .dark-mode .uhtg-modal .modal-head{background:#152237}
  .uhtg-step{grid-template-columns:30px minmax(0,1fr);gap:9px;padding:14px 0}.uhtg-step-num{width:28px;height:28px}.uhtg-step-body{min-width:0}
  .uhtg-between{align-items:stretch;flex-direction:column}.uhtg-between>.uhtg-inline{width:100%;display:grid;grid-template-columns:1fr 1fr}.uhtg-between>.uhtg-inline button{width:100%;min-height:42px}
  .uhtg-auto-rule{padding:10px;gap:10px}.uhtg-pref-grid{grid-template-columns:1fr}.uhtg-pref-grid>label:not(.uhtg-threshold){min-height:44px}.uhtg-threshold{justify-content:space-between}.uhtg-threshold select{height:42px}
  .uhtg-inline{width:100%}.uhtg-inline>button,.uhtg-inline>select,.uhtg-inline>input{width:100%!important;min-width:0!important;min-height:42px}
  .uhtg-search-row{flex-direction:column;align-items:stretch!important;padding:10px}.uhtg-search-row>div:last-child{width:100%;justify-content:flex-start!important}.uhtg-search-row [data-uhtg-test]{margin-left:auto}
  .uhtg-block{margin-top:10px;padding:12px}.uhtg-main{align-items:flex-start}.uhtg-actions{display:grid;grid-template-columns:auto 1fr}.uhtg-actions button{width:100%}
  .uhs-auto-toast{right:10px;left:10px;bottom:max(10px,env(safe-area-inset-bottom));width:auto}
  .uhs-modal-actions{padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
}
