/* =========================================================================
   1. TEMA BASE & PERSONALIZAÇÃO GLOBAL (REHAGRO ROOT)
   ========================================================================= */
.pages.show .page-title {
  font-size: 1.3em !important;
  font-weight: 400 !important;
  margin: 0px !important;
  color: #000 !important;
  display: none !important;
}

.ic-Login__content {
  opacity: 0.9;
}

.ic-Login__header .ic-Login__header__logo img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.ic-brand-Login-body-bgd-color {
  background-color: none;
}

.button_pginicial {
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  border-radius: 20px;
  color: #ffffff;
  font-family: Tahoma;
  font-size: 24px;
  font-weight: 100;
  padding: 16px;
  background-color: #067320;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.floatLeft {
  float: left;
}

.buttonspageInitial {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 35px;
}

.buttonspageInitial div {
  display: flex;
  justify-content: space-between;
  width: 70%;
}

.buttonspageInitial a {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  text-decoration: none;
  width: 250px;
  height: 50px;
  border-radius: 6px;
  background-color: #75c154;
  color: white;
  cursor: pointer;
  text-align: center;
}

.buttonspageInitial a:hover {
  background-color: rgb(117, 193, 84);
  color: white;
}

.buttonspageInitial span {
  padding-left: 10px;
}

.c-box-video__title {
  font-size: 24px;
  text-align: center;
  text-shadow: 1px 1px 1px #44822a;
  margin-bottom: 5px;
}

.c-box-video__description {
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  background-color: rgba(0, 0, 0, 0.41);
  padding: 15px 10px;
  margin-bottom: 30px;
  border-radius: 6px;
}

/* Cards de Navegação */
.cardbody {
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardcontainer {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 850px;
}

.card {
  width: 260px;
  background: #f2f2f2;
  padding: 0px;
  margin: 0px 10px 50px;
  border-radius: 10px;
  box-shadow: 5px 5px 10px rgba(163, 177, 198, 0.5), -9px -9px 16px 5px rgba(255, 255, 255, 0.5);
}

.img_card {
  max-height: 215px;
  position: relative;
  border-radius: 10px 10px 0px 0px;
  margin: 0px auto 0px auto;
  display: block;
  margin-bottom: 0px;
}

.card h4 {
  padding: 15px 20px 0px 20px;
  line-height: 1.1;
  text-align: left;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0px;
}

.card h5 {
  text-align: left;
  color: #5e5e5e;
  font-size: 1rem;
  margin: 0px;
  padding: 5px 20px;
  box-sizing: border-box;
}

.card p {
  color: #696969;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5rem;
}

.card a,
.btn_curso a {
  display: block;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  background-color: #013d2f;
  border-style: hidden;
  color: #013d2f;
  margin: 10px 20px 20px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 3px 3px 10px rgba(163, 177, 198, 0.8), -5px -5px 16px 5px rgba(255, 255, 255, 0.5);
  border-radius: 5px;
}

.card a:hover,
.btn_curso a:hover {
  background-color: #c8a058;
}

.cardempty {
  width: 260px;
  background: rgba(255, 0, 0, 0);
  padding: 0px;
  margin: 0px 10px 50px;
}

@media (min-width: 480px) {
  .c-box-video__title {
    font-size: 24px;
  }

  .c-box-video__description {
    font-size: 16px;
  }

  .col-xs-12 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
    float: left;
    width: 100%;
  }

  .slider {
    overflow: hidden;
  }

  .slider>.slider-content {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    transition: all 500ms ease;
  }

  .slider>.slider-content>.slider-item {
    flex: 0 0 auto;
    width: 100%;
  }

  .slider>input:nth-child(1):checked~.slider-content {
    transform: translateX(0%);
  }

  .slider>input:nth-child(2):checked~.slider-content {
    transform: translateX(-100%);
  }

  .slider>input:nth-child(3):checked~.slider-content {
    transform: translateX(-200%);
  }

  .slider>input:nth-child(4):checked~.slider-content {
    transform: translateX(-300%);
  }
}

/* =========================================================================
   2. TRILHA STUDIO - ESTILOS DO CONTAINER DA PLAYLIST
   ========================================================================= */
:root {
  --cm-primary: #00732f;
  --cm-success: #28a745;
  --cm-bg: #ffffff;
  --cm-border: #e1e1e1;
  --cm-text: #333;
  --cm-text-light: #666;
  --cm-hover: #f5f5f5;
  --cm-active-bg: #f5f5f5;
}

@media (min-width: 768px) {
  .cm-layout-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    overflow: hidden;
  }

  .lti-embed-container {
    width: 100%;
    max-width: 100%;
  }

  .lti-embed-container iframe,
  .cm-content-area iframe.lti-embed {
    height: calc(100vh - 13rem);
    border: none;
    border-radius: 4px;
  }

  .cm-content-area {
    flex: 1;
    min-width: 65%;
  }

  #custom-course-sidebar-anchor {
    max-width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 13rem);
    overflow-y: auto;
    z-index: 100;
  }

  #custom-course-sidebar-anchor,
  .cm-content-area iframe {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s;
  }

  #custom-course-sidebar-anchor:hover,
  .cm-content-area iframe:hover {
    scrollbar-color: #bbb transparent;
  }

  /* WebKit Custom Scrollbars */
  #custom-course-sidebar-anchor::-webkit-scrollbar,
  .cm-content-area iframe::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  #custom-course-sidebar-anchor::-webkit-scrollbar-track,
  .cm-content-area iframe::-webkit-scrollbar-track {
    background: transparent;
  }

  #custom-course-sidebar-anchor::-webkit-scrollbar-thumb,
  .cm-content-area iframe::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: content-box;
  }

  #custom-course-sidebar-anchor:hover::-webkit-scrollbar-thumb,
  .cm-content-area iframe:hover::-webkit-scrollbar-thumb {
    background-color: #bbb;
  }

  #custom-course-sidebar-anchor::-webkit-scrollbar-thumb:hover,
  .cm-content-area iframe::-webkit-scrollbar-thumb:hover {
    background-color: #888;
  }
}

/* Modificadores de Iframe de conteúdo simulado */
.mock-content p.guias {
  overflow: hidden;
}

.mock-content p.guias iframe {
  margin-top: -70px;
}

/* Estrutura do Accordion da Sidebar */
#custom-course-sidebar-anchor {
  width: 100%;
  margin-bottom: 20px;
}

/* Barra de Progresso Geral */
.cm-overall-progress {
  background: #ffffff;
  border: 1px solid var(--cm-border);
  border-radius: 6px;
  padding: 10px 14px 12px;
  margin-bottom: 12px;
}

.cm-overall-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cm-overall-progress-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
  letter-spacing: 0.04em;
}

.cm-overall-progress-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}

.cm-overall-progress-bar {
  height: 8px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.cm-overall-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  border-radius: 4px;
  transition: width 0.6s ease;
  width: 0%;
}

.cm-sidebar-accordion {
  width: 100%;
}

.cm-module {
  border: 1px solid var(--cm-border);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.cm-module:last-child {
  margin-bottom: 0;
}

.cm-module-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--cm-text);
  gap: 8px;
  transition: background 0.2s;
  background: transparent;
}

.cm-module-header:hover {
  background: var(--cm-hover);
}

.cm-header-content {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
}

.cm-module-title {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 14px;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  line-height: 1.35;
}

.cm-progress-text {
  grid-column: 1;
  grid-row: 2;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.cm-progress-bar {
  grid-column: 2;
  grid-row: 2;
  height: 6px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.cm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  transition: width 0.5s ease;
  border-radius: 3px;
}

.cm-arrow-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin: auto;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
}

.cm-arrow-icon svg {
  display: block;
}

/* Itens da Trilha */
.cm-module-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0;
  background: transparent;
}

.cm-module.cm-expanded .cm-module-items {
  max-height: 1000px;
}

.cm-module-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--cm-text);
  border: none;
  background: transparent;
  transition: background 0.2s;
  font-size: 13px;
}

.cm-module-item:hover {
  background: var(--cm-hover);
  text-decoration: none;
}

.cm-module-item.cm-active {
  background: var(--cm-active-bg);
  color: var(--cm-primary);
  font-weight: 500;
  border-left: 3px solid var(--cm-primary);
  padding-left: 13px;
}

.cm-status-icon {
  margin-right: 10px;
  min-width: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-status-icon svg {
  display: block;
}

.cm-status-icon .bi-circle {
  width: 6px;
  height: 6px;
}

.cm-status-icon .bi-check {
  width: 21px;
  height: 21px;
  color: var(--cm-success);
}

/* Subgrupos de Itens (3º Nível - Marcador ⏵) */
.cm-subgroup {
  border-top: 1px solid var(--cm-border);
}

.cm-subgroup:first-child {
  border-top: none;
}

.cm-subgroup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text-light);
  transition: background 0.2s;
  user-select: none;
}

.cm-subgroup-header:hover {
  background: var(--cm-hover);
}

.cm-subgroup-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
}

.cm-subgroup-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-subgroup-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.cm-subgroup.cm-subgroup-expanded .cm-subgroup-items {
  max-height: 2000px;
}

.cm-subgroup-items .cm-module-item {
  padding-left: 28px;
}

.cm-subgroup-items .cm-module-item.cm-active {
  padding-left: 25px;
}

@media (max-width: 768px) {
  #custom-course-sidebar-anchor {
    margin-top: 20px;
    max-height: none;
    position: relative;
  }

  .cm-layout-container {
    flex-direction: column;
  }
}

/* =========================================================================
   BOTÃO FLUTUANTE DE SUPORTE WHATSAPP
   Snippet de uso nas páginas do Canvas:
   <a id="suporte-wpp-button" href="#" onclick="openModalWpp();return false;" aria-label="Suporte via WhatsApp"></a>
   ========================================================================= */
#suporte-wpp-button {
  position: fixed !important;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: wpp-pulse 2.5s infinite;
}

#suporte-wpp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6), 0 3px 10px rgba(0,0,0,0.2);
  text-decoration: none;
}

#suporte-wpp-button svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  display: block;
}

/* Tooltip */
#suporte-wpp-button::before {
  content: "Suporte";
  position: absolute;
  right: 70px;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#suporte-wpp-button:hover::before {
  opacity: 1;
}

/* Pulso de atenção */
@keyframes wpp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5), 0 4px 16px rgba(37,211,102,0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0), 0 4px 16px rgba(37,211,102,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 4px 16px rgba(37,211,102,0.4); }
}

@media (max-width: 768px) {
  #suporte-wpp-button {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }

  #suporte-wpp-button svg {
    width: 28px;
    height: 28px;
  }
}