﻿/* CSS Reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

  blockquote:before, blockquote:after,
  q:before, q:after {
    content: '';
    content: none;
  }

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Aplica estilos globalmente */
body, h1, h2, h3, p, span, td, th, tr, th, div, ul, li, a {
  font-weight: 300 !important;
  color: black;
}




/*Resets*/

.a-reset {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}


.btn-reset {
  background: none;
  color: inherit;
  border: none;
  font: inherit;
  padding: 0;
  cursor: pointer;
  outline: inherit;
}


/* FONTS */
body {
  font-family: 'Inter', 'Avenir', 'Montserrat', 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Helvetica', 'Arial', sans-serif;
  font-weight: 700;
}

p, a, li, span, input, button {
  font-family: inherit;
}





/* SideBar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html[data-bs-theme="dark"] {
  --sidebar-text-color: #fff;
}

:root {
  --sidebar-width: 250px;
  --sidebar-width-minimized: 80px;
  --sidebar-bg-color: var(--bs-secondary);
  --sidebar-text-color: #000000;
  --sidebar-hover-color: var(--bs-primary);
  --toggle-btn-bg-color: var(--bs-primary);
  --toggle-btn-color: white;
  --overlay-bg-color: rgba(0,0,0,0.5);
}

#sidebar-offcanvas a i,
#sidebar-offcanvas button i {
  display: inline-block;
  transform-origin: center;
}

#sidebar-offcanvas a:hover i,
#sidebar-offcanvas button:hover i {
  animation: salto 0.5s ease-in-out forwards;
}

@keyframes salto {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.1); /* Hacer el �cono un 10% m�s grande en el punto medio */
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.crm-sidebar-container {
  /*display: flex;*/
  height: 100vh;
}

.crm-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg-color);
  z-index: 1040;
}

  .crm-sidebar-overlay.show {
    display: block;
  }

.crm-sidebar {
  height: 100%;
  position: fixed;
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg-color);
  color: var(--sidebar-text-color);
  transition: width 0.3s;
  display: flex;
  flex-direction: column;
  z-index: 1050;
}

  .crm-sidebar.minimized {
    width: var(--sidebar-width-minimized);
  }

    .crm-sidebar.minimized .crm-nav-link span {
      display: none;
    }

    .crm-sidebar.minimized .crm-user-info span {
      display: none;
    }

.crm-nav-link {
  color: var(--sidebar-text-color);
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

  .crm-nav-link:hover {
    background-color: var(--bs-primary);
    color: var(--bs-light);
  }

  .crm-nav-link i {
    margin-right: 8px;
  }

  .crm-nav-link span {
    font-size: 16px;
  }


.crm-sidebar.minimized .crm-nav-link {
  justify-content: center;
}

  .crm-sidebar.minimized .crm-nav-link i {
    margin-right: 0;
  }

.crm-sidebar.minimized .crm-dropdown-toggle i {
  margin-left: 1em;
  margin-right: 1em;
}

.crm-sidebar.minimized .crm-submenu .crm-nav-link i {
  margin-left: 1.33em;
}

.crm-sidebar-header {
  margin-top: 20px;
  padding: 1rem 1rem 0 1rem;
  text-align: center;
}

.crm-sidebar-footer {
  padding: 1rem;
  text-align: center;
}

.crm-sidebar-header img {
  max-width: 100%;
  height: auto;
}

.crm-sidebar-content {
  padding: 20px 0;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

  .crm-sidebar-content .active {
    color: #fff;
    background-color: var(--sidebar-hover-color);
  }

  .crm-sidebar-content .active {
    background-color: var(--sidebar-hover-color);
  }

.crm-sidebar-footer {
  margin-top: auto;
  position: relative;
}

.crm-user-info {
  position: relative;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-align: center;
}



.crm-user-dropdown-menu {
  display: none;
  position: absolute;
  background-color: var(--sidebar-bg-color);
  right: 0;
  left: auto;
  bottom: 100%;
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

  .crm-user-dropdown-menu.show {
    display: block;
  }

  .crm-user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--sidebar-text-color);
  }

    .crm-user-dropdown-menu a i {
      margin-right: 8px;
    }

.crm-dropdown-menu {
  display: none;
  position: absolute;
  background-color: var(--sidebar-bg-color);
  right: 0;
  left: auto;
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.crm-dropdown-toggle {
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  color: inherit;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.crm-dropdown-menu.show {
  display: block;
}

.crm-toggle-btn {
  position: fixed;
  bottom: 20px;
  left: calc(var(--sidebar-width) + 10px);
  background-color: var(--toggle-btn-bg-color);
  border: none;
  color: var(--toggle-btn-color);
  cursor: pointer;
  padding: 0.5rem;
  transition: left 0.3s;
  z-index: 1060;
}

.crm-sidebar.minimized + .crm-toggle-btn {
  left: calc(var(--sidebar-width-minimized) + 10px);
}

.crm-content {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s;
  flex-grow: 1;
  padding: 1rem;
}

.crm-sidebar.minimized ~ .crm-content {
  margin-left: var(--sidebar-width-minimized);
}

.collapse {
  display: none;
}

  .collapse.show {
    display: block;
  }

.crm-submenu .crm-nav-link {
  padding-left: 1.5rem;
  justify-content: flex-start;
}

.crm-sidebar.minimized .crm-submenu .crm-nav-link {
  padding-left: 1rem;
}

@media (max-width: 768px) {

  .crm-sidebar-header {
    margin: 0px;
    padding-top: 20px;
    margin-bottom: -20px;
    text-align: center;
  }

    .crm-sidebar-header img {
      max-width: 60%;
      height: auto;
    }


  .crm-sidebar {
    width: 100%;
    height: 100vh;
    display: none;
  }

  .crm-sidebar-content {
    padding: 0 80px;
  }

  .crm-sidebar.show {
    display: flex;
  }

  .crm-submenu {
    list-style: none;
  }

  .crm-user-dropdown-menu .crm-nav-link {
    justify-content: center;
  }

  .crm-toggle-btn {
    left: auto;
    right: 20px;
    bottom: 20px;
  }

    .crm-toggle-btn.btn-sm {
      padding: 0.25rem 0.5rem;
    }

  .crm-content {
    margin-left: 0;
  }
}


/*ActiveWhenControllers*/
.no-opacity {
  background-color: var(--bs-primary) !important;
  color: var(--bs-light) !important;
}


/*TABLE*/
rounded-header-table {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  overflow: hidden; /* Asegura que el redondeo funcione correctamente */
}

.rounded-header-table th:first-child {
  border-top-left-radius: 5px;
}

.rounded-header-table th:last-child {
  border-top-right-radius: 5px;
}



/*DIALOG*/

/* Estilos para el dialog */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 5px;
  /*padding: 20px;*/
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 50%;
  z-index: 1000;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

  .dialog-header h2 {
    margin: 0;
  }

  .dialog-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
  }



/*Asterisco en label*/
.requiredField::after {
  content: '\F151';
  font-family: bootstrap-icons;
  font-size: .5rem;
  margin: .1rem;
  vertical-align: text-top;
  color: var(--bs-danger);
}



/*Loader*/
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.loader {
  border: 16px solid var(--bs-secondary);
  border-top: 16px solid var(--bs-primary);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

.container-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-container {
  position: relative;
  z-index: 1000;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}



/*Toasts*/
@keyframes spinFadeIn {
  0% {
    opacity: 0;
    transform: rotateY(90deg) scale(1);
  }

  60% {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }

  70% {
    transform: rotateY(0) scale(1.01);
  }

  75% {
    transform: rotateY(0) scale(0.995);
  }

  80% {
    transform: rotateY(0) scale(1.01);
  }

  85% {
    transform: rotateY(0) scale(0.995);
  }

  90% {
    transform: rotateY(0) scale(1.01);
  }

  95% {
    transform: rotateY(0) scale(0.995);
  }

  100% {
    transform: rotateY(0) scale(1);
  }
}

.toast-custom {
  transform-origin: right center;
  animation: spinFadeIn 1.2s forwards;
  color: #000;
}

  .toast-custom .toast-body {
    padding: 10px 20px;
  }



/*Utils*/

.text-ellipsis {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}


/* CHECKBOX */
.emphasized-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #ccc;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  outline: none;
}

  .emphasized-checkbox::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin: auto;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .emphasized-checkbox:hover {
    border: 2px solid #888;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
