/* This file is part of Moodle - http://moodle.org/ */

.block-mwa-dashboard-app #page-heatmap .hm-kpi,
.block-mwa-dashboard-app #page-heatmap .card {
  overflow: visible;
  position: relative;
}
.block-mwa-dashboard-app #page-heatmap.active{display:flex;flex-direction:column;}
.block-mwa-dashboard-app #page-heatmap>.hero{order:0;}
.block-mwa-dashboard-app #page-heatmap>.hm-kpis{order:1;}
.block-mwa-dashboard-app #page-heatmap>.hm-filter-panel{order:2;}
.block-mwa-dashboard-app #page-heatmap>.hm-layout{order:3;}

.block-mwa-dashboard-app #page-heatmap .hm-kpi {
  z-index: 30;
}

.block-mwa-dashboard-app #page-heatmap .card {
  border-radius: var(--radius-xl);
  z-index: 20;
}

.block-mwa-dashboard-app #page-heatmap .card-head {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: visible;
  position: relative;
  z-index: 40;
}

.block-mwa-dashboard-app #page-heatmap .hm-kpi-lbl,
.block-mwa-dashboard-app #page-heatmap .hm-card-title {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.block-mwa-dashboard-app #page-heatmap .hm-kpi-lbl .mwa-help-tip,
.block-mwa-dashboard-app #page-heatmap .hm-card-title .mwa-help-tip {
  flex: 0 0 auto;
  margin-left: 2px;
}

.block-mwa-dashboard-app #page-heatmap .mwa-help-tip {
  z-index: 10020;
}

.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip::after {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
  z-index: 10020;
}

.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-color: transparent;
  border-bottom-color: #101828;
  transform: translateX(-50%) translateY(-4px);
  z-index: 10021;
}

.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip:hover::after,
.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip:focus::after,
.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip:hover::before,
.block-mwa-dashboard-app #page-heatmap .card-head .mwa-help-tip:focus::before {
  transform: translateX(-50%) translateY(0);
}

.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip::after {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip::before {
  left: auto;
  right: 10px;
  transform: translateY(-4px);
}

.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip:hover::after,
.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip:focus::after,
.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip:hover::before,
.block-mwa-dashboard-app #page-heatmap .hm-side .card-head .mwa-help-tip:focus::before {
  transform: translateY(0);
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin: 0 0 18px 0;
  padding: 16px 18px 18px;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-title {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 1rem;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 14px;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1.1fr) minmax(170px, .8fr) minmax(190px, .9fr) minmax(150px, .7fr);
  margin-bottom: 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.block-mwa-dashboard-app #page-heatmap .hm-date-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-date-filters button {
  font-size: .76rem;
  padding: 8px 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-clear-filters {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: .76rem;
  font-weight: 800;
  gap: 6px;
  height: 38px;
  margin-left: auto;
  padding: 0 14px;
}

.block-mwa-dashboard-app #page-heatmap .hm-clear-filters:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.block-mwa-dashboard-app #page-heatmap .hm-date-input {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: .78rem;
  height: 38px;
  padding: 0 10px;
}

.block-mwa-dashboard-app #page-heatmap .hm-search-wrap {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: none;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.block-mwa-dashboard-app #page-heatmap .hm-search-wrap span {
  color: var(--blue);
  flex: 0 0 auto;
  font-size: .85rem;
}

.block-mwa-dashboard-app #page-heatmap .hm-search-wrap input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: .78rem;
  min-height: 38px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.block-mwa-dashboard-app #page-heatmap .hm-search-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-dim), var(--shadow);
}

.block-mwa-dashboard-app #page-heatmap .hm-layout {
  align-items: stretch;
}

.block-mwa-dashboard-app #page-heatmap .hm-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.block-mwa-dashboard-app #page-heatmap .hm-kpi:hover,
.block-mwa-dashboard-app #page-heatmap .hm-kpi:focus {
  border-color: var(--blue2);
  box-shadow: 0 14px 34px rgba(91, 155, 213, .18);
  transform: translateY(-2px);
}

.block-mwa-dashboard-app #page-heatmap .hm-cell {
  cursor: pointer;
  outline: none;
  position: relative;
  transition: box-shadow .12s ease, transform .12s ease;
}

.block-mwa-dashboard-app #page-heatmap .hm-cell:hover,
.block-mwa-dashboard-app #page-heatmap .hm-cell:focus,
.block-mwa-dashboard-app #page-heatmap .hm-cell.is-selected {
  box-shadow: inset 0 0 0 2px var(--blue);
  transform: scale(1.04);
  z-index: 2;
}

.block-mwa-dashboard-app #page-heatmap .hm-deadline-dot {
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  height: 9px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 9px;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-card {
  display: none;
  flex: 1;
  margin-top: 0;
  overflow: visible;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-card[style*="display: block"] {
  display: flex !important;
  flex-direction: column;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-card[style*="display: block"] .hm-detail-body {
  flex: 1;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-body {
  padding: 16px;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-stats div {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-stats strong {
  color: var(--blue);
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-stats span,
.block-mwa-dashboard-app #page-heatmap .hm-muted {
  color: var(--muted);
  font-size: .76rem;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-grid h4 {
  color: var(--text);
  font-size: .78rem;
  letter-spacing: .05em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-section-head h4 {
  margin: 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-message-students {
  align-items: center;
  display: inline-flex;
  font-size: .72rem;
  justify-content: center;
  margin-top: 9px;
  padding: 7px 11px;
  width: auto;
}

.block-mwa-dashboard-app #page-heatmap .hm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.block-mwa-dashboard-app #page-heatmap .hm-chip {
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: .7rem;
  max-width: 94px;
  overflow: hidden;
  padding: 5px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-mwa-dashboard-app #page-heatmap .hm-chip:hover {
  border-color: var(--blue2);
  color: var(--blue);
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section[open] {
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 10px 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section summary::-webkit-details-marker {
  display: none;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section summary span {
  color: var(--muted);
  flex: 1;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section summary strong {
  background: var(--blue-dim);
  border-radius: 999px;
  color: var(--blue);
  font-size: .72rem;
  min-width: 28px;
  padding: 3px 8px;
  text-align: center;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section summary em {
  color: var(--blue);
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section[open] summary em {
  color: var(--muted);
}

.block-mwa-dashboard-app #page-heatmap .hm-name-section .hm-chip-row {
  border-top: 1px solid var(--line);
  max-height: 150px;
  overflow: auto;
  padding: 10px 12px 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-activity-section .hm-resource-list {
  border-top: 1px solid var(--line);
  max-height: 250px;
  overflow: auto;
  padding: 6px 12px 10px;
}

.block-mwa-dashboard-app #page-heatmap .hm-resource-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.block-mwa-dashboard-app #page-heatmap .hm-resource-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 7px 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-resource-row a,
.block-mwa-dashboard-app #page-heatmap .hm-resource-row span {
  color: var(--text);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}

.block-mwa-dashboard-app #page-heatmap .hm-resource-row a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.block-mwa-dashboard-app #page-heatmap .hm-resource-row small {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: .72rem;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-select {
  background: #fff !important;
  border: 1px solid var(--line2) !important;
  border-radius: 12px !important;
  box-shadow: none;
  color: #111827 !important;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  min-width: 0;
  outline: none;
  height: 38px;
  padding: 0 14px;
  width: 100%;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-select:focus,
.block-mwa-dashboard-app #page-heatmap .hm-filter-select:hover {
  background: #fff !important;
  border-color: var(--line2) !important;
  color: #111827 !important;
}

.block-mwa-dashboard-app #page-heatmap .hm-filter-select option,
.block-mwa-dashboard-app #page-heatmap .hm-filter-select option:checked,
.block-mwa-dashboard-app #page-heatmap .hm-filter-select option:hover {
  background: #fff !important;
  color: #111827 !important;
}

@media (max-width: 1100px) {
  .block-mwa-dashboard-app #page-heatmap .hm-filter-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .block-mwa-dashboard-app #page-heatmap .hm-filter-grid {
    grid-template-columns: 1fr;
  }
  .block-mwa-dashboard-app #page-heatmap .hm-date-filters button,
  .block-mwa-dashboard-app #page-heatmap .hm-date-input {
    flex: 1 1 140px;
  }
}

.block-mwa-dashboard-app #page-heatmap .hm-ai-box {
  background: var(--blue-dim);
  border: 1px solid rgba(91, 155, 213, .2);
  border-radius: 14px;
  margin-top: 14px;
  padding: 12px;
}

.block-mwa-dashboard-app #page-heatmap .hm-ai-box strong {
  color: var(--blue);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.block-mwa-dashboard-app #page-heatmap .hm-ai-box p {
  color: var(--text);
  font-size: .82rem;
  line-height: 1.5;
  margin: 6px 0 0;
}

.block-mwa-dashboard-app #page-heatmap .hm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.block-mwa-dashboard-app #page-heatmap .hm-grade-row,
.block-mwa-dashboard-app #page-heatmap .hm-besttime-action {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.block-mwa-dashboard-app #page-heatmap .hm-grade-row:hover span,
.block-mwa-dashboard-app #page-heatmap .hm-besttime-action:hover div {
  color: var(--blue);
}

@media (max-width: 900px) {
  .block-mwa-dashboard-app #page-heatmap .hm-detail-grid,
  .block-mwa-dashboard-app #page-heatmap .hm-detail-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .block-mwa-dashboard-app #page-heatmap .hm-detail-card {
    flex: none;
  }
}

/* KPIs no padrão visual dos motivos de intervenção. */
.block-mwa-dashboard-app #page-heatmap>.hm-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:20px;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi{--hm-kpi-color:#5b9bd5;--hm-kpi-bg:rgba(91,155,213,.08);--hm-kpi-border:rgba(91,155,213,.27);border-radius:14px;display:flex;flex-direction:column;gap:8px;min-height:132px;overflow:visible;padding:11px 14px 10px;position:relative;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi::before{background:transparent;border:0;border-radius:14px;border-top:3px solid var(--hm-kpi-color);bottom:0;box-sizing:border-box;content:"";height:auto;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .15s;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi:hover::before,.block-mwa-dashboard-app #page-heatmap .hm-kpi:focus::before{opacity:1;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi:hover,.block-mwa-dashboard-app #page-heatmap .hm-kpi:focus{background:var(--hm-kpi-bg);border-color:var(--hm-kpi-border);box-shadow:0 4px 16px rgba(0,0,0,.1);}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-head{align-items:center;display:flex;gap:10px;min-height:42px;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-icon{align-items:center;background:var(--hm-kpi-bg);border:1px solid var(--hm-kpi-border);border-radius:10px;color:var(--hm-kpi-color);display:inline-flex;flex:0 0 40px;font-size:1.25rem;height:40px;justify-content:center;line-height:1;width:40px;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-lbl{color:var(--hm-kpi-color);font-size:.78rem;font-weight:900;line-height:1.2;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-val{color:var(--hm-kpi-color);font-family:'DM Mono',ui-monospace,monospace;font-size:1.75rem;font-weight:900;line-height:1;margin:auto 0 0;}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-amber{--hm-kpi-color:#ca861a;--hm-kpi-bg:rgba(202,134,26,.08);--hm-kpi-border:rgba(202,134,26,.27);}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-blue{--hm-kpi-color:#5b9bd5;--hm-kpi-bg:rgba(91,155,213,.08);--hm-kpi-border:rgba(91,155,213,.27);}
.block-mwa-dashboard-app #page-heatmap .hm-kpi-teal{--hm-kpi-color:#20a99a;--hm-kpi-bg:rgba(32,169,154,.08);--hm-kpi-border:rgba(32,169,154,.27);}
@media(max-width:900px){.block-mwa-dashboard-app #page-heatmap>.hm-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.block-mwa-dashboard-app #page-heatmap>.hm-kpis{grid-template-columns:1fr;}}
