
:root {
  --primary: #13568d;
  --secondary: #4cbbc9;
  --success: #027654;
  --info: #406CD2;
  --warning: #F7B742;
  --danger: #cf3131;
  --light: #757474;
  --dark: #212121;
}
/* GENERAL STYLES */

.gap-0 {
    gap: 0!important
}

.gap-1 {
    gap: .25rem!important
}

.gap-2 {
    gap: .5rem!important
}

.gap-3 {
    gap: 1rem!important
}

.gap-4 {
    gap: 1.5rem!important
}

.gap-5 {
    gap: 3rem!important
}

.row-gap-0 {
    row-gap: 0!important
}

.row-gap-1 {
    row-gap: .25rem!important
}

.row-gap-2 {
    row-gap: .5rem!important
}

.row-gap-3 {
    row-gap: 1rem!important
}

.row-gap-4 {
    row-gap: 1.5rem!important
}

.row-gap-5 {
    row-gap: 3rem!important
}

.btn {
    box-shadow: none !important;
}
.popover-region.collapsed{
  overflow:hidden;
  .popover-region-container {
    z-index: -1;
  }
}

.rui-course-card-img-top {
  border-radius: 8px 8px 0 0;
}

/* PAGE INDEX */
#page-site-index {
  #page {
    padding: 0;
    .rui-hero {
      border-radius: 0;
    }
  }
}

/* DASHBOARD */
#page-my-index {
  #block-region-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    > section.card {
      flex: 1 1 calc(50% - 1rem );
      margin-bottom: 2rem;
      display: flex;
      align-items: flex-start;
      > .card-body {
        width: 100%;
      }
      @media (max-width: 768px) {
        flex-basis: 100%;
        margin-bottom: 0;
      }
      .rui-course-card {
        border: solid 1px black;
      }
      &.block_xp {
        .card-text {
          border: solid 1px black;
          padding: 1.5rem;
          border-radius: 8px;
          margin-top: 15px;
        }
      }
    }
    > span {
      position: absolute;
    }
  }
  [data-display="card"] .rui-course-card-deck {
    grid-template-columns: 1fr;
  }

  .user-name {
    @media (max-width: 767.98px) {
      font-size: 2rem;
    }
  }
  .local-roledashboard-alerts {
    position: fixed;
    right: 0;
    padding: 1rem;
    top: 100px;
    z-index: 99;
    max-width: 50%;
    @media (max-width: 767.98px) {
      max-width: 80%;
    }
  }
}
body {
    &:not(#page-my-index) {
        #dashboardblock1, #dashboardblock2 {
            display: none !important;
        }
    } 
}

/* LOGO TOP BAR */
.rui-topbar-logo,
.rui-topbarlogo  {
  position: relative;
  justify-content: flex-start;
  width: 490px;
  max-width: 100%;
  height: auto;
  top: inherit;
  left: inherit;
  padding: 1rem;
    @media (max-width: 767.98px) {
      width: 100%;
      height: 60px !important;
      min-height: 60px;
      padding: .5rem 1rem;
      max-width: calc(100% - 170px);
      display: flex;
    }
  img {
    width: 100%;
    height: auto !important;
    margin-left: 0 !important;
  }
}

/* NO LOGIN */

body.notloggedin {

  /* MENU TOP BAR */
  .rui-topbarlogo-wrapper {
    width: calc(100% - 140px);
  }
  nav.moremenu.observed {
    width: calc(100% - 140px) !important;
  }
  .rui-icon-menu {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    .rui-login-btn {
      height: 40px;
    }
  }
}
.rui-topbarlogo-wrapper  {
  height: auto;
}
.breadcrumbs-container {
  &:hover {
    background-color: #ffffff00;
  }
}
.breadcrumb {
  .breadcrumb-item {
    display: flex;
    align-items: center;
    a {
      background-color: var(--primary);
      padding: .4rem 1rem;
      border-radius: .75rem;
      color: var(--white);
      .text-truncate {
        max-width: 152px;
      }
      @media (max-width: 768px){
          padding: .2rem .6rem;
          .text-truncate {
            max-width: 125px;
          }
      }
      &:hover {
        background-color: var(--secondary);
      }
    }
    &::before {
        display: inline-flex;
        align-items: center;
        padding-right: 4px;
        font-size: 14px;
        color: #3e3e3e;
        content: "➤";
    }
    &:first-child::before {
      content: none;
    }
    &:nth-child(2):not(:has(a[aria-current="page"])) {
      display: none;
    }
  }
}
.local-roledashboard-badge,
.local-roledashboard-ruleslink {
  font-size: 12px;
  width: auto;
  display: inline-flex;
  flex-direction: column;
  background-color: #ebebeb;
  padding: .5rem;
  border-radius: .5rem;
}
/* my/courses.php */
body#page-my-index {
  &.page-mycourses {
/*     .rui-breadcrumbs,
    .rui-topbar-title {
      display: none !important;
    } */
    /* Vista general de cursos */
    section.block_myoverview {
      #instance-5-header,
      div[data-region="filter"]{
        display: none !important;
      }
      .rui-course-card-deck {
        display: flex;
        align-items: center;
      }
      .rui-course-card {
        width: 100%;
        .rui-coursemenu-btn {
          display: none !important;
        }
      }
    }
  }
}

/* PAGE CURSO */

body.path-course.path-course-view  {
  &.role-student {
    .secondary-navigation {
      display: none !important;
    }
  }
  &.format-ludilearn {
    ul.nav-pills:not(:has(+ .card-body div.tab-pane#pills-lesson))  {
      display: none;
    }
  }
}
/* PAGES USER */
/* body.path-course {
    &.role-student {
    .rui-breadcrumbs {
      display: none !important;
    }
  }
} */

/* FOOTER*/
#s-page-footer{
  .rui-footer-logotypes-grid {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    .rui-footer-logotype-item-wrapper {
      flex-direction: column-reverse;
    }
  }
}

 /* Estilos del BotÃģn Flotante cookies*/
.cookie-float {
    position: fixed !important;
    bottom: 12px;
    right: 12px; /* Cambiar a 'right' si se prefiere en el otro lado */
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: #2b3035; /* Color oscuro tipo Bootstrap */
    color: white;
    padding: 6px 8px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    overflow: hidden;
    max-width: 40px; /* Estado inicial: solo icono */
        height: 40px;
    white-space: nowrap;
    /* border: 2px solid transparent; */
    i {
        font-size: 1.3rem;
        min-width: 24px;
        display: flex;
        justify-content: center;
    }
    .cookie-text {
        opacity: 0;
        margin-left: 0;
        font-weight: 500;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    &:hover {
        max-width: 220px; /* Se expande para mostrar el texto */
        padding-right: 20px;
        background-color: #495057;
        color: white;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        .cookie-text {
            opacity: 1;
            margin-left: 10px;
        }
    }
}
#back-to-top {
    @media (min-width: 768px) {
       right: 12px;
       bottom: 60px;
    }
}

/* page-local */
body#page-local-staticpage-view {
  .rui-breadcrumbs,
  .rui-topbar-title {
    display: none !important;
  }
}


/* PAGE RIGISTRO */

.form-control, .comment-area textarea, .usp-search-field, .path-mod-assign [data-region="grade-panel"] .comment-area textarea[cols], .form-select {
    box-shadow: none !important;
}
#page-login-signup {
  #page-wrapper {
    width: 100%;
  }
  /* Acuerdo con las Condiciones del Sitio */
  .rui-ftoggler .ftoggler {
    background: transparent;
    border: var(--bs-border-width) solid var(--bs-border-color);
    padding: 4px 0px 4px 8px;
    h3 {
      font-size: var(--bs-font-size-xs);
      font-weight: var(--bs-font-weight-bold);
    }
  }
  .rui-loginpage-intro-logo {
    justify-content: flex-start;
    .rui-login-logo {
      width: 460px;
      max-width: 100%;
    }
    
  }
  .rui-login-layout--1 {
    .rui-login-box {
        width: 100%;
        max-width: 830px;
    }
  }
  @media (min-width: 992px) {
      .rui-login-box .rui-login-content {
          width: 600px;
      }
  }
  .btn--cookie {display: none !important;}

}
#page-login-confirm, #page-login-signup, #page-user-policy {
#page {
    padding: 0 !important;
    .rui-topbarlogo-wrapper {
        position: relative;
        top: 0 !important;
        left: 0;
        z-index: 1;
        width: calc(100% + 2rem);
        max-width: calc(100% + 2rem);
        border-radius: 0;
        margin-left: -1rem;
        margin-top: -1rem;
      /* .rui-topbarlogo {
          width: calc(100% + 100px);
          position: relative;
          top: 0 !important;
          display: block;
          max-width: calc(100% + 100px);
          margin-top: 0px;
          z-index: 1;
          padding-inline: 1rem;
        .rui-custom-logo {
          position: relative;
          justify-content: flex-start;
          width: 490px;
          max-width: 100%;
          height: auto;
          margin-block: 1rem;
          margin-inline: 0;
          }
      } */
    }
    nav.moremenu.observed {
      width: 0;
      height: 0;
      display: none;
    }
    #page-content {
      padding: 1rem !important;
    }
    #s-page-footer {
      margin-left: 0;
      width: 100%;
    }
  }

}
#page-user-policy {
  #resourceobject {width: 100% !important;}
  .box.py-3.generalbox {
    border: 1px solid #c4c4c4;
    border-radius: 1rem;
    overflow: hidden;
    padding: 1rem !important;
  }
}
/* PAGE LOGIN*/
#page-login-index {
  .rui-login-layout--1 {
    .rui-login-box {
        max-width: 600px;
        .rui-login-content {
        width: 430px;
        @media (max-width: 499px) {
          width: auto;
        }
      }
    }
  }
  .btn--cookie {display: none !important;}
  .rui-loginpage-intro-logo .rui-login-logo {
    width: 420px;
    max-width: 100%;
  }
  .rui-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 1rem;
    .rui-footer-nav {
      justify-content: center;
    } 
  }
}

#page-wrapper {
  #page {
      padding: 5px 70px 0;
      margin-top: 0;
    @media (max-width: 767.98px){
      padding: 7px 50px 0;
    }
    &.drawers {
      @media (max-width: 767.98px) {
        overflow: initial;
      }
    }




    #supervideo_area_embed {
      iframe {
        height: 100% !important;
      }
    }
  }
}

.drawer-toggler {
  @media (min-width: 768px) {
    top: calc(59px + 62px);
  }    
  @media (max-width: 767.9px) {
    top: 70px;
  }  
}

/* Configuración vistas modulos/actividades */
body {
  &.path-mod {
    .activity-navigation {
      display: none;
    }
    &.role-student {
      .secondary-navigation {
        display: none !important;
      }
    }
  }
  &.format-ludilearn {
    .c100 .slice {
      overflow: hidden;
    }
  }
} 

/* FOOTER*/
/* .rui-footer-cta,
#s-page-footer {
  margin-left: -70px;
  width: calc(100% + 140px);
  @media (max-width: 767.98px){
    margin-left: -50px;
    width: calc(100% + 100px);
  }
} */
.rui-footer-cta {
  border: none !important;
  display: flex;
  justify-content: center;
  background-color: #f5f5f5;
}
#s-page-footer {
  margin-block: 0;
  background: var(--white);
  border-radius: 0;
  border: none !important;
  padding: 6rem 0 3rem;
  margin-left: -70px;
  width: calc(100% + 140px);
  margin-top: 4rem;
    @media (max-width: 767.98px) {
        margin-left: -50px;
        width: calc(100% + 100px);
    }
  .rui-footer-contact-info {
    display: none;
  }
  .rui-footer-content {
    margin: auto;
    width: calc(100% - 140px);
    @media (max-width: 767.98px) {
      width: calc(100% - 100px);
    }
  }
  .rui-footer-logotypes {
    border: none !important;
    padding: 0 !important;
    margin-block: 0;
  }
}
.rui-footer-logotypes .rui-footer-logotype-item-wrapper .rui-footer-logotype-link {
  flex-direction: column-reverse;
  .text_to_html {
    color: var(--white) !important;
  }
  
}
.rui-footer-content{
  .rui-footer-nav {
    @media (max-width: 767.98px) {
          justify-content: center;
          width: 100%;
    }
    .nav-item .nav-link {
      color: var(--primary) !important;
      font-weight: 400;
    }
  }
  p {
    color: var(--primary) !important;font-weight: 400;
    @media (max-width: 767.98px) {
      text-align: center;
    }
    &.inline {
      font-size: 16px;
    }
  }
}
#page-login-index {
  .rui-footer-content {
    .nav-item .nav-link {
      color: var(--white) !important;
    }
    p {
      color: var(--white) !important;
    }
  }
}

/* page-local-staticpage-view */
body#page-local-staticpage-view {
  padding-top: 0;

}