/* Compact Taxonomy Design - Unikt kompakt design */
#ka .course-grid.col-1-4 {
    grid-template-columns: 1fr 300fr;
    column-gap: 0;
}

#ka .filter-container,
#ka .courselist-header,
#ka .filter-toggle-button {
    display: none!important;
}

#ka .compact-course-date {
    font-weight: 400;
    font-size: var(--ka-font-s);
}
#ka .compact-course-date i.ka-icon {
    display: inline-block;
    width: var(--ka-font-s);
    height: var(--ka-font-s);
    margin-right: 3px;
    margin-top: -3px;
}

#ka span.course-available:before {
    margin: 6px 3px 2px 0;
    /* margin: 0; */
}





/* 1) Radoppsett */
.compact-course-content {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #e9e9e98a;
  padding: 0.4rem 0;
}
.compact-course-content:hover {
    background: #00000003;
}

/* 2) Venstre del (der lenka bor) må få lov å fylle ut */
.compact-course-info-wrapper {
  flex: 1;
  min-width: 0; /* viktig for at flex-barn kan krympe */
  display: flex;
}

/* 3) Selve "info"-boksen må også strekke seg */
.compact-course-info {
  flex: 1;
  min-width: 0; /* unngår at innholdet stopper utvidelsen */
  display: flex;
}

/* 4) Gjør lenka til en fleksibel blokk som fyller HELE bredden */
.compact-course-info > a {
  display: flex;            /* tvinger lenka til å bli blokk/flex */
  width: 100%;              /* fyll hele tilgjengelige bredden */
  flex: 1 1 auto;           /* strekker seg */
  min-width: 0;             /* lar innholdet wraps/ellipsis */
  align-items: center;
  text-decoration: none;
  color: inherit;
  /* Om temaet overstyrer, bruk !important på display/width/flex */
}

/* 5) Første og andre kolonne inni lenka */
.compact-course-first-column {
  flex: 0 0 120px;          /* fast bredde for dato (juster) */
}

.compact-course-second-column {
  flex: 1 1 auto;           /* tar resten av plassen */
  min-width: 0;             /* muliggjør tekst-ellipsis/linjebryting */
  display: flex;
  flex-direction: column;
}

/* 6) Høyre del (knapp) krymper ikke inn over lenka */
.compact-course-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}











/* Course Image */
#ka .compact-course-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--light-bg, #f5f5f5);
}

#ka .compact-course-image a {
    display: block;
    width: 100%;
    height: 100%;
}

#ka .compact-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#ka .compact-item:hover .compact-course-image img {
    transform: scale(1.05);
}

/* Title Styling */
#ka .compact-course-title {
    margin: 0;
    font-size: var(--ka-font-s-plus);
    font-weight: 400;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--heading-color, #1a1a1a);
    text-decoration: none;
    transition: color 0.2s;
}

#ka .compact-course-title a:hover {
    color: var(--ka-color, #3b82f6);
}

#ka .compact-course-title span.compact-course-location {
    opacity: 0.7;
}

/* Action Buttons */
#ka .compact-course-actions {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-shrink: 0;
}

#ka .compact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
#ka .compact-btn:hover,
#ka .compact-btn:focus {
    box-shadow: none;
    color: var(--ka-color, #3b82f6);
}
#ka .compact-btn-primary {
    background: transparent;
    color: inherit;
}

/* No Courses Message */
#ka .no-courses {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg, #f9f9f9);
    border-radius: 8px;
    margin: 2rem 0;
}




/* --- Mobil stor --- */
@media (max-width: 800px) {
    .compact-course-content {
        flex-direction: column;
        align-items: stretch;
    }
    .compact-course-info > a {
        align-items: flex-start;
    }
    #ka .compact-course-title {
        margin-top: 5px!important;
    }
    #ka .compact-course-actions{
      justify-content: flex-end;
    }
    #ka .compact-btn-primary {
        color: var(--ka-color, #3b82f6);
    }
}
/* --- Mobil --- */
@media (max-width: 600px) {
  .compact-course-content {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-course-info > a {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .compact-course-first-column,
  .compact-course-second-column,
  .compact-course-actions {
    width: 100%;
  }
    .compact-course-first-column {
    flex: 0 0 10px;
  }

  #ka .compact-btn-primary {
      color: var(--ka-color, #3b82f6);
  }
}
  /* --- Mobil --- */
  @media (max-width: 600px) {
    .compact-course-content {
      flex-direction: column;
      align-items: stretch;
    }
  
    .compact-course-info > a {
      flex-direction: column-reverse;
      align-items: flex-start;
    }
  
    .compact-course-first-column,
    .compact-course-second-column,
    .compact-course-actions {
      width: 100%;
    }
      .compact-course-first-column {
      flex: 0 0 10px;
    }
  }