/* Stesso foglio di unibo.didattica (static/obiettivi-chevrons.css), con i colori del tema del
   sito di corso al posto del rosso del portale: --themeColor-secondary e' definita da
   unibotheme.cds (colors_var.less) sulla classe del colore secondario che LayoutPolicy.bodyClass
   mette sul body, con un default su :root. E' la stessa variabile degli accordion del tema
   (overview/tab_overview.less). I secondari sono tutti scuri, quindi il testo bianco sulla riga
   aperta resta leggibile con ogni tema. Il valore dopo la virgola vale solo senza il tema. */

th.col-toggle,
td.col-toggle {
  width: 1em;
  text-align: center;
  padding: 0.5em 0;
}

td.col-toggle {
  vertical-align: middle;
}

.chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border: none;
  border-radius: 4px;
  color: var(--themeColor-secondary, #003366);
  font-size: 1.25em;
  padding: 0.5rem;
  vertical-align: middle;
  transition:
    background-color 0.2s,
    transform 0.3s ease;
  padding-top: 0rem;
  background: transparent;
}

.chevron-btn:hover {
  background: transparent;
}

/* Freccia come nel contenuto apri e chiudi (contentOpenClose.less del tema del portale):
   icona Font Awesome 6 Pro, caricata anche da unibotheme.cds, angle-down da chiuso e
   angle-up da aperto. */
.chevron-btn::after {
  content: "\f107";
  display: inline-block;
  font-family: "Font Awesome 6 Pro";
  font-weight: 400;
}

.chevron-btn[aria-expanded="true"]::after {
  content: "\f106";
  color: #fff;
}

/* Riga aperta, nel colore del sito. Qui il manifesto e' #u-manifestum, senza la classe
   manifestum del portale. */
#u-manifestum tr:has(.chevron-btn[aria-expanded="true"]) {
  background: var(--themeColor-secondary, #003366);
  color: #fff;
}

#u-manifestum tr:has(.chevron-btn[aria-expanded="true"]) .title a {
  color: #fff;
  border-bottom-color: currentColor;
}

.detail-row > td {
  padding: 0 !important;
  border-bottom: 1px solid #e8e8e8;
}

.detail-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.detail-row.open .detail-content-wrapper {
  grid-template-rows: 1fr;
}

.detail-content {
  overflow: hidden;
}

.detail-inner {
  padding: 0;
  transition: padding 0.3s ease;
  font-size: 0.9em;
  line-height: 1.65;
  color: #444;
  background: #fafafa;
}

.detail-row.open .detail-inner {
  padding: 0.8em 1em 0.8em 1em;
}

@media only screen and (min-width: 1025px) {
  .detail-row.open .detail-inner {
    padding: 0.8em 10em 0.8em 7em;
  }
}

.detail-spinner {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #888;
  font-size: 0.85em;
  padding: 0.8em 1em 0.8em 3.5em;
}

.detail-spinner::before {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid #ddd;
  border-top-color: var(--themeColor-secondary, #003366);
  border-radius: 50%;
  animation: obiettivi-spin 0.7s linear infinite;
}

.detail-error {
  color: #c0392b;
  font-size: 0.85em;
  padding: 0.5em 0;
}

.detail-error button {
  margin-left: 0.5em;
  border: none;
  background: none;
  color: var(--themeColor-secondary, #003366);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

@keyframes obiettivi-spin {
  to {
    transform: rotate(360deg);
  }
}
