/* =====================================================================
   TELA: MATERIAIS (lista de documentos p/ download)
   ===================================================================== */

.materials-content {
  padding-top: 34px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-x: hidden;
}

.material-row {
  grid-template-columns: 54px 1fr 34px;
  min-height: 68px;
}

.material-file-row {
  width: 100%;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 84px;
  padding-right: 10px;
}

.material-file-info {
  min-width: 0;
}

.material-file-info small {
  color: #60758a;
}

.material-file-actions {
  display: flex;
  gap: 6px;
}

.material-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.material-action-download {
  background: var(--navy);
  color: #fff;
}

.material-action:hover,
.material-action:focus-visible {
  background: var(--navy);
  color: #fff;
}

.material-action:active {
  transform: scale(0.97);
}

/* Em telas largas, a área de documentos precisa ter uma largura explícita.
   Isso evita que o posicionamento absoluto do content-card comprima os cards. */
@media (min-width: 781px) {
  #materiais .materials-content {
    right: auto;
    left: 50%;
    width: min(calc(100% - 64px), 820px);
    max-width: none;
    margin: 0;
    padding: 34px 32px;
    transform: translateX(-50%);
  }

  #materiais .material-file-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 84px;
  }
}

@media (max-width: 380px) {
  .material-file-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding-left: 6px;
  }

  .material-file-row .doc-icon {
    width: 32px;
    height: 38px;
  }

  .material-file-actions {
    flex-direction: column;
  }

  .material-action {
    min-height: 28px;
    padding: 5px 8px;
  }
}

.doc-icon,
.download-icon {
  display: block;
  color: var(--navy);
}

.doc-icon {
  position: relative;
  width: 36px;
  height: 42px;
  justify-self: center;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.doc-icon::before {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 14px;
  height: 2px;
  content: "";
  background: currentColor;
  box-shadow: 0 8px 0 currentColor;
}

.download-icon {
  position: relative;
  width: 26px;
  height: 28px;
}

.download-icon::before {
  position: absolute;
  top: 1px;
  left: 11px;
  width: 4px;
  height: 15px;
  content: "";
  background: currentColor;
}

.download-icon::after {
  position: absolute;
  inset: 10px 2px 2px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  content: "";
}
