/* ASHO Admin Overrides (loaded last) */
:root{
  --LS-admintheme-basecolor: #007CB7;

  --ashia-blue: #007CB7;
  --ashia-blue-100: #EAF0F7;
  --ashia-blue-200: #DDE7F2;
  --ashia-blue-300: #C8D5E0;
  --ashia-blue-400: #A5B9C7;

  --ashia-text-dark: #003B5C;
  --ashia-text-muted: #4B6475;

  --ashia-bg-white: #FFFFFF;
  --ashia-bg-striped: #F7FAFF;

  --ashia-border: #C8D5E0;
  --ashia-border-light: #E1E8EF;

  --ashia-focus-ring: rgba(0,124,183,.25);
}

/* Base */
body{ color: var(--ashia-text-dark) !important; background: var(--ashia-bg-striped) !important; }
.text-muted{ color: var(--ashia-text-muted) !important; }

/* Links */
a, a:visited{ color: var(--ashia-blue) !important; }
a:hover, a:focus{ color: var(--ashia-text-dark) !important; }

/* Buttons */
.btn-primary{
  background: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
}
.btn-outline-secondary{
  border-color: var(--ashia-border) !important;
  color: var(--ashia-text-dark) !important;
}
.btn-outline-secondary:hover{
  background: var(--ashia-blue-100) !important;
}

/* Forms */
.form-control, input, select, textarea{
  border-color: var(--ashia-border) !important;
}
.form-control:focus, input:focus, select:focus, textarea:focus{
  border-color: var(--ashia-blue) !important;
  box-shadow: 0 0 0 .2rem var(--ashia-focus-ring) !important;
}

/* Tables */
.table thead th{
  background: var(--ashia-blue-100) !important;
  color: var(--ashia-text-dark) !important;
  border-color: var(--ashia-border) !important;
}
.table td, .table th{
  border-color: var(--ashia-border-light) !important;
}
.table-striped tbody tr:nth-of-type(odd){
  background: var(--ashia-bg-striped) !important;
}

/* Login branding helpers */
.logo-alt-1{ background-size: contain !important; }
.decor-1, .decor-2{ opacity: .25; }

/* =========================================================
   ASHIA fine-tuning for LS Admin (Sea Green derived)
   Fix: purple focus rings, login sidebar, side menu, buttons
   ========================================================= */

/* Bootstrap palette override (affects many components) */
:root{
  --bs-primary: #007CB7;
  --bs-secondary: #003B5C;

  /* unify focus/hover shadow color */
  --ashia-shadow: rgba(0,124,183,.35);
}

/* Top navbar header line uses LS var */
:root{ --LS-admintheme-basecolor: var(--bs-primary); }

/* Replace the purple shadows defined in theme with Ashia blue */
.btn:hover{
  box-shadow: 0 0 0 3px var(--ashia-shadow) !important;
}
.btn:focus,
.btn:active,
.btn.active,
.btn:active:focus,
.btn.dropdown-toggle.show,
.btn.dropdown-toggle.show:focus{
  box-shadow: 4px 4px 0px var(--ashia-shadow) !important;
}

/* Primary button hover/focus uses theme shadow: override */
.btn-primary:hover{ box-shadow: 0 0 0 3px var(--ashia-shadow) !important; }
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:focus{
  box-shadow: 4px 4px 0px var(--ashia-shadow) !important;
}

/* Secondary / cancel shadows */
.btn-secondary:hover, .btn-cancel:hover{ box-shadow: 0 0 0 3px var(--ashia-shadow) !important; }
.btn-secondary:focus, .btn-secondary:active, .btn-secondary.active, .btn-secondary:active:focus,
.btn-secondary.dropdown-toggle.show, .btn-secondary.dropdown-toggle.show:focus,
.btn-cancel:focus, .btn-cancel:active, .btn-cancel.active, .btn-cancel:active:focus,
.btn-cancel.dropdown-toggle.show, .btn-cancel.dropdown-toggle.show:focus{
  box-shadow: 4px 4px 0px var(--ashia-shadow) !important;
}

/* Inputs focus (bootstrap already uses vars but ensure consistent ring) */
.form-control:focus, input:focus, select:focus, textarea:focus{
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 .2rem rgba(0,124,183,.25) !important;
}

/* Login panel styling */
.login .sidebar-l{
  background: #003B5C !important; /* Ashia dark */
}
.login .col-right{
  background: #FFFFFF !important;
}
.login .col-right h1, .login .col-right .h1{
  color: #003B5C !important;
}

/* Optionally tone down decorative shapes */
.decor-1, .decor-2{ opacity: .18 !important; }

/* Side-menu / navbar-nav panel (the slide-in menu container) */
.side-menu-container > .navbar-nav{
  background: #FFFFFF !important;
  border-right: 1px solid #E1E8EF !important;
}
.side-menu-container .navbar-nav .nav-link{
  color: #003B5C !important;
}
.side-menu-container .navbar-nav .nav-link:hover,
.side-menu-container .navbar-nav .nav-link:focus{
  background: #EAF0F7 !important;
  color: #003B5C !important;
}

/* Active menu entry (best-effort: works with bootstrap active patterns) */
.side-menu-container .navbar-nav .active > .nav-link,
.side-menu-container .navbar-nav .nav-link.active{
  background: #EAF0F7 !important;
  border-left: 3px solid #007CB7 !important;
  color: #003B5C !important;
}

/* Tabs active */
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link{
  color: #003B5C !important;
  border-color: #C8D5E0 #C8D5E0 #FFFFFF !important;
}
.nav-tabs .nav-link:hover{
  border-color: #DDE7F2 #DDE7F2 #C8D5E0 !important;
}

/* Dropdown active */
.dropdown-item.active, .dropdown-item:active{
  background: #007CB7 !important;
  color: #FFFFFF !important;
}


/* =========================================================
   ASHIA - fixes de legibilidad y navbar
   ========================================================= */

/* Panel selector create question: asegurar contraste */
#adminsidepanel__sidebar--selectorCreateQuestion{
  background: var(--ashia-blue) !important;
  color: #fff !important;
}
#adminsidepanel__sidebar--selectorCreateQuestion,
#adminsidepanel__sidebar--selectorCreateQuestion *{
  color: #fff !important;
}

/* Botón primario */
.btn-primary{
  background: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
  color: #fff !important;
}

/* Navbar: quitar fondo translúcido y usar Ashia text */
.navbar{
  background-color: var(--ashia-blue-100) !important; /* o #fff */
  color: var(--ashia-text-dark) !important;
  border-bottom: 1px solid var(--ashia-border-light) !important;
}
.navbar .nav-link,
.navbar a,
.navbar-brand{
  color: var(--ashia-text-dark) !important;
}
.navbar .nav-link:hover,
.navbar a:hover{
  color: var(--ashia-blue) !important;
}


/* =========================================================
   Replace purple (#8146F6) with ASHIA blue
   ========================================================= */

/* Bootstrap info -> Ashia primary */
:root{
  --bs-info: var(--ashia-blue);
}

/* Buttons info */
.btn-info{
  color: #fff !important;
  background-color: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
}
.btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active{
  background-color: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
  filter: brightness(.95);
  box-shadow: 0 0 0 3px rgba(0,124,183,.35) !important;
}

/* Outline info */
.btn-outline-info{
  color: var(--ashia-blue) !important;
  stroke: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
}
.btn-outline-info:hover, .btn-outline-info:focus, .btn-outline-info:active, .btn-outline-info.active{
  background-color: var(--ashia-blue) !important;
  border-color: var(--ashia-blue) !important;
  color: #fff !important;
}

/* Grid icons purple -> blue */
.grid-view .action-list a i::before,
.grid-view-ls .action-list a i::before{
  color: var(--ashia-blue) !important;
}

/* Actionbar switch icon */
.survey-actionbar .survey-actionbar-switch i[active]{
  color: var(--ashia-blue) !important;
}


/* =========================================================
   Rebrand navbar brand (text + icon) WITHOUT touching core
   ========================================================= */

/* selector más específico para ganar a bootstrap/admin css */
.navbar .navbar-brand{
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: .5rem !important;

  /* oculta texto original */
  font-size: 0 !important;
  line-height: 0 !important;
  white-space: nowrap !important;
}

/* ocultar icono core */
.navbar .navbar-brand > img{
  display: none !important;
}

/* icono desde tu theme */
.navbar .navbar-brand::before{
  content: "" !important;
  width: 34px !important;
  height: 34px !important;
  display: inline-block !important;
  background: url("../images/logo-icon-white.png") no-repeat center !important;
  background-size: contain !important;
}

/* texto corporativo */
.navbar .navbar-brand::after{
  content: "Asho" !important;
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  color: var(--ashia-text-dark, #003B5C) !important;
}


/* FORCE navbar brand rebrand (higher specificity) */
.navbar a.navbar-brand{
  font-size: 0 !important;
  line-height: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: .5rem !important;
}

.navbar a.navbar-brand > img{
  display: none !important;
}

.navbar a.navbar-brand::before{
  content: "" !important;
  width: 34px !important;
  height: 34px !important;
  display: inline-block !important;
  background: url("/upload/admintheme/Asho_Admin/images/logo-icon-white.png") no-repeat center !important;
  background-size: contain !important;
}

.navbar a.navbar-brand::after{
  content: "Asho" !important;
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: var(--ashia-text-dark, #003B5C) !important;
}


/* =========================================================
   Fix: btn-outline-secondary active background (was #333641)
   ========================================================= */
.btn-group .btn-check:active + .btn-outline-secondary,
.btn-group .btn-check:checked + .btn-outline-secondary,
.btn-group .btn-outline-secondary.active,
.btn-group .btn-outline-secondary.dropdown-toggle.show,
.btn-group .btn-outline-secondary:active{
  background-color: var(--ashia-blue-100) !important; /* o var(--ashia-blue) si lo quieres sólido */
  border-color: var(--ashia-blue-300) !important;
  color: var(--ashia-text-dark) !important;
}
.btn-group .btn-outline-secondary:focus,
.btn-group .btn-check:focus + .btn-outline-secondary{
  box-shadow: 0 0 0 3px rgba(0,124,183,.25) !important;
}


/* =========================================================
   Remove green accents -> ASHIA blue palette
   ========================================================= */

/* list-group hover (was #9cba9e) */
a.list-group-item:hover{
  background-color: var(--ashia-blue-100) !important;
  color: var(--ashia-text-dark) !important;
}

/* Sidebar question groups marker (was green #14AE5C) */
#sidebar .questiongroup-list-group > li{
  background: linear-gradient(
    90deg,
    var(--ashia-blue) 0%,
    var(--ashia-blue) 5px,
    var(--ashia-blue-100) 5px,
    var(--ashia-blue-100) 100%
  ) !important;
  padding: 0 !important;
}

/* Sidebar selected item marker (was green #40ab46) */
#sidebar .subpanel.level-0 .selected{
  font-weight: 500;
  background: linear-gradient(
    to right,
    var(--ashia-blue) 0px,
    var(--ashia-blue) 8px,
    #fff 8px,
    #fff 100%
  ) !important;
  color: var(--ashia-text-dark) !important;
}

