/* ============================================================================
   EduTools Hero - Estilos Principais
   
   NOTA: Estilos do ChatGPT foram removidos para evitar conflitos com Moodle
   ============================================================================ */

.chatgpt-button {
    background: var(--cardbg);
}


/* === CONTAINER PRINCIPAL DO BLOCO HERO === */
.container_edutools_hero .edutools-dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
    border-radius: 10px;
    font-family: 'Arial', sans-serif;
}

/* === TOPO (ÁREA 1 - barra superior com texto e busca) === */
.container_edutools_hero .dashboard-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* === BASE (ÁREAS 2 E 3) === */
.container_edutools_hero .dashboard-bottom-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* === ÁREA 2: ESQUERDA - Perfil do usuário + Eventos === */
.container_edutools_hero .header-left {
    flex: 1 1 25%;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    background: color-mix(in srgb, var(--cardbg) 90%, black);
    padding: 20px 30px;
    border-radius: 10px;
    border: 1px solid var(--cardborder);
}

/* === ÁREA 3: DIREITA - Destaques (swiper) === */
.container_edutools_hero .header-right {
    flex: 2 1 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--cardbg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--cardborder);
}

.container_edutools_hero .header-right2 {
    flex: 1 1 25%;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    background: color-mix(in srgb, var(--cardbg) 90%, black);
    padding: 10px 30px;
    border-radius: 10px;
    border: 1px solid var(--cardborder);
}

.activityiconcontainer .activityicon, 
.activityiconcontainer .icon {
    margin: 0;
    font-size: 25px;
    height: 25px;
    width: 25px;
    max-height: 25px;
    max-width: 25px;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .container_edutools_hero .dashboard-top-bar,
    .container_edutools_hero .dashboard-bottom-bar {
        flex-direction: column;
    }

    .container_edutools_hero .header-left,
    .container_edutools_hero .header-right,
    .container_edutools_hero .header-right2 {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .container_edutools_hero .top-right {
        margin-top: 10px;
    }
}

/* === PERFIL DO USUÁRIO === */
.container_edutools_hero .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.container_edutools_hero .user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.container_edutools_hero .user-info span {
    font-size: 0.85rem;
    color: #666;
}

/* === LISTA DE EVENTOS === */
.container_edutools_hero .event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.container_edutools_hero .event-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
}

.container_edutools_hero .event-item.atrasado {
    background: #ffe6e6;
    border-left: 4px solid #e53935;
}

.container_edutools_hero .event-date {
    font-size: 1.5rem;
    font-weight: bold;
    color: #444;
}

.container_edutools_hero .event-info .event-title {
    font-weight: bold;
}

.container_edutools_hero .event-status {
    font-size: 0.8rem;
    color: #999;
}

/* === Altura controlável do herobanner === */
:root {
    --hero-slide-h: 300px;
}

/* O container Swiper precisa de altura fixa e sem padding */
.container_edutools_hero .header-right.swiper,
.swiper-edutools {
    height: var(--hero-slide-h) !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden;
}

/* O wrapper e os slides precisam herdar 100% da altura */
.swiper-edutools .swiper-wrapper {
    height: 100% !important;
    align-items: stretch;
}

.swiper-edutools .swiper-slide {
    height: 100% !important;
    display: flex !important;
}

/* O link/overlay e o card interno também devem ocupar 100% */
.container_edutools_hero .highlight-overlay,
.container_edutools_hero .highlight-content {
    height: 100% !important;
}

/* Remova limites conflitantes de altura do card */
.container_edutools_hero .highlight-content {
    min-height: 0 !important;
    max-height: none !important;
    padding: 20px;
}

/* O degradê e a imagem de fundo já cobrem o slide todo */
.container_edutools_hero .highlight-content {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* === SWIPER (ÁREA 3 - Destaques) === */
.container_edutools_hero .swiper {
    padding: 0 !important;
}

.container_edutools_hero .header-right.swiper {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    max-height: 300px;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.container_edutools_hero .swiper-slide {
    background-size: cover;
    background-position: center;
    position: relative;
    height: 100%;
    display: flex;
}

.container_edutools_hero .highlight-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0));
    padding: 20px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.container_edutools_hero .highlight-content {
    max-width: 60%;
}

.container_edutools_hero .highlight-badge {
    display: inline-block;
    font-size: 0.8rem;
    background: var(--cardbg);
    color: var(--cardcolor);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    width: auto !important;
    white-space: nowrap;
}

.container_edutools_hero .highlight-content h3 {
    font-size: 1.2rem;
    margin: 0 0 5px;
    color: #222;
}

.container_edutools_hero .highlight-content p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* Estilo para descrição das academias - limitada a 4 linhas */
.container_edutools_hero .academy-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 5.6em;
    word-wrap: break-word;
}

.container_edutools_hero .swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 20px;
    z-index: 10;
}

/* === SEARCH CONTAINER === */
.container_edutools_hero .search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === SEARCH BAR === */
.container_edutools_hero .course-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.container_edutools_hero .course-search-form .search-input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 200px;
    color: var(--cardcolor)!important;
}

.container_edutools_hero .course-search-form .search-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.container_edutools_hero .course-search-form .search-button:hover {
    background: #0056b3;
}

/* Saudação destacada no topo */
.container_edutools_hero .welcome-headline {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* ==== PERFIL DO USUÁRIO ==== */
.edutools-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.edutools-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.edutools-user-info span {
    font-size: 0.85rem;
    color: #666;
}

/* ==== EVENTOS ==== */
.edutools-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edutools-event-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.edutools-event-date {
    font-size: 1.5rem;
    font-weight: bold;
    color: #444;
}

/* Flex item que contém o título precisa poder encolher */
.container_edutools_hero .edutools-event-list .event .overflow-auto {
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Título em UMA linha, com reticências */
.container_edutools_hero .edutools-event-list .event h4 > a {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.container_edutools_hero .edutools-event-list .event h4 > a.text-truncate {
    display: block;
    width: 100%;
}

/* Container da data */
.container_edutools_hero .edutools-event-list .event .date {
    font-size: 0.8rem;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Links dentro da data */
.container_edutools_hero .edutools-event-list .event .date a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.edutools-event-title {
    font-weight: bold;
    color: #333;
}

.edutools-event-status {
    font-size: 0.8rem;
    color: #777;
}

.edutools-event-more {
    margin-top: 10px;
    text-align: right;
}

.edutools-event-more a {
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: none;
}

.edutools-event-more a:hover {
    text-decoration: underline;
}

.edutools-event-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.edutools-event-item.event-today {
    background-color: #ffeaea !important;
    border-left-color: #d9534f !important;
}

/* PROGRAMS */
.edutools-programs {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: calc(1rem - 0.5rem * .5);
    background-color: transparent;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

.edutools-programs .btn {
    margin-left: .5rem;
}

/* Indicador de ação para academias clicáveis */
.academy-action {
    margin-top: 15px;
    text-align: center;
}

.academy-link-text {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.swiper-slide:hover .academy-link-text {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos para slides não clicáveis */
.swiper-slide:not([data-program-url]) .academy-action,
.swiper-slide[data-program-url="#"] .academy-action {
    display: none;
}

/* Garante que a imagem do card apareça mesmo com o bg do container */
.highlight-content {
    position: relative;
    min-height: 220px;
    max-height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
}

/* Link ocupando todo o slide */
.highlight-overlay {
    display: block;
    text-decoration: none;
    color: inherit;
}

.highlight-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
}

.highlight-content > * {
    position: relative;
    z-index: 1;
}

/* O wrapper do bloco onde o JS coloca o background do slide ativo */
.edutools-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Evite que o container interno cubra o fundo do wrapper */
.container_edutools_hero,
.edutools-dashboard-header,
.header-right.swiper {
    background: transparent;
}

/* O banner do próprio slide com a imagem */
.highlight-overlay { 
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.highlight-content {
    position: relative;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
}

.highlight-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
}

.highlight-content > * { 
    position: relative; 
    z-index: 1; 
}

/* O link que cobre o slide não deve ter pano branco por cima */
.container_edutools_hero .highlight-overlay {
    background: transparent !important;
    padding: 0;
    display: block;
    height: 100%;
}

/* O card do slide carrega a imagem de fundo */
.container_edutools_hero .highlight-content {
    max-width: 100% !important;
    max-height: 300px;
    padding: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Mantém o degradê escuro leve sobre a foto */
.container_edutools_hero .highlight-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
}

/* Título/descrição acima do degradê */
.container_edutools_hero .highlight-content > * {
    position: relative;
    z-index: 1;
}

/* Cada slide com altura mínima pra imagem aparecer */
.swiper-edutools .swiper-slide {
    max-height: 300px;
}

/* Controles */
body.path-my .header-right {
    --veil-width: 35%;
    --fade-width: 40px;
    --veil-opacity: 1;
    --veil-opacity2: 0.80;
    --copy-width: 30%;
}

body.path-my .highlight-content {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
    padding: 18px 20px;
}

/* Véu único: branco -> branco -> transparente */
body.path-my .highlight-content .left-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--cardbg) 95%, transparent) 0,
        color-mix(in srgb, var(--cardbg) 80%, transparent) calc(var(--veil-width)),
        color-mix(in srgb, var(--cardbg) 0%, transparent) calc(var(--veil-width) + var(--fade-width))
    );
}

/* Texto limitado à área branca */
body.path-my .highlight-content h3,
body.path-my .highlight-content .academy-description {
    position: relative;
    z-index: 2;
    max-width: var(--copy-width);
    color: var(--cardcolor);
    margin: 0 0 6px;
}

body.path-my .highlight-content .academy-description { 
    margin: 0; 
    line-height: 1.35; 
}

body.path-my .highlight-content h3 {
    margin: 0 0 6px;
    font-weight: 700;
}

/* Em telas menores, aumenta um pouco as larguras */
@media (max-width: 768px) {
    body.path-my .header-right {
        --veil-width: 75%;
        --copy-width: 75%!important;
        --fade-width: 96px;
    }
}

body.path-my .header-right .swiper-pagination {
    position: absolute;
    left: 16px;
    bottom: 14px;
    right: auto;
    width: auto;
    text-align: left;
    z-index: 3;
}

/* === Centrando o conteúdo na lateral esquerda do slide === */
.container_edutools_hero .highlight-content {
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 24px !important;
    --copy-width: 40%;
}

/* Mantém a largura do bloco de cópia à esquerda */
.container_edutools_hero .highlight-content > .highlight-badge,
.container_edutools_hero .highlight-content > h3,
.container_edutools_hero .highlight-content > .academy-description {
    max-width: var(--copy-width);
    width: 100%;
}

/* Camadas: gradiente atrás, texto na frente */
.container_edutools_hero .highlight-content .left-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.95) 0,
        rgba(255,255,255,0.85) 35%,
        rgba(255,255,255,0) 55%
    );
}

.container_edutools_hero .highlight-content > *:not(.left-gradient) {
    position: relative;
    z-index: 2;
}

/* Tipografia básica */
.container_edutools_hero .highlight-content h3 {
    margin: 6px 0 6px;
    font-weight: 700;
    color: #0f172a;
}

.container_edutools_hero .highlight-content .academy-description {
    margin: 0;
    line-height: 1.35;
    color: #0d1b2a;
}

/* Responsivo: dá mais espaço pro texto em telas menores */
@media (max-width: 768px) {
    .container_edutools_hero .highlight-content {
        --copy-width: 75%;
        padding: 16px 18px !important;
    }
    
    body.path-my .header-right .swiper-pagination {
        bottom: 4px!important;
    }
}

/* Blocos embedded */
.ed-embedded-block.card {
    background: transparent;
    border: 0px solid rgba(255,255,255,.06);
    border-radius: 12px;
    overflow: hidden;
}

.ed-embedded-block .card-header {
    background: transparent;
    border: 0;
    padding: .75rem 1rem;
}

.ed-embedded-block .card-title {
    margin: 0;
    font-weight: 700;
}

.ed-embedded-block .card-body {
    padding: 0 1rem 1rem; 
    background: transparent!important;
}

.ed-embedded-block.block_game .progress,
.ed-embedded-block.block_game .progress-bar {
    height: 8px;
    border-radius: 999px;
}

.ed-embedded-block.block_game .progress-bar {
    background: #FFD700;
}
/*
.block_game .ed-tools .ed-tool a MAS RODRIGOOO
*/

/* animação suave e contínua no ícone do ChatGPT */
.chatgpt-button img {
  animation: chatgpt-wobble 6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes chatgpt-wobble {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}



/* Toast container */
.ed-badge-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 9999;
  display: grid; place-items: end;
}

/* Card */
.ed-badge-card{
  width: min(420px, 92vw);
  background: #0f232b;
  color: #eaf7f3;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: .35s ease;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Header gradiente Edutools */
.ed-badge-hero{
  display:flex; gap:12px; align-items:center;
  padding:14px 16px;
  background: linear-gradient(135deg,#38957D 0%, #416A91 60%, #294461 100%);
}
.ed-badge-emoji{ font-size:22px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.ed-badge-hero-text strong{ font-weight:700; display:block; }

/* Body */
.ed-badge-body{
  display:flex; gap:14px; align-items:center; padding:14px 16px;
}
.ed-badge-body img{
  width:72px; height:72px; border-radius:16px; object-fit:cover;
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
  background:#1b2f38;
}
.ed-badge-name{ font-weight:700; font-size:16px; margin-bottom:4px; }
.ed-badge-desc{ opacity:.85; }

/* CTA */
.ed-badge-actions{ padding:12px 16px 16px; }
.ed-badge-btn{
  display:inline-block; padding:10px 14px; border-radius:12px;
  background:#38957D; color:#fff; text-decoration:none; font-weight:600;
}
.ed-badge-btn:hover{ filter:brightness(1.05); }

/* Close */
.ed-badge-close{
  position:absolute; top:8px; right:10px;
  background:transparent; border:0; color:#fff; font-size:22px; opacity:.8; cursor:pointer;
}
.ed-badge-close:hover{ opacity:1; }

/* States */
.ed-badge-toast.show .ed-badge-card{ transform: translateY(0); opacity:1; }

/* Responsivo */
@media (max-width:480px){
  .ed-badge-body{ align-items:flex-start; }
}

