/* Expandable List Styles */
.expandable-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.expandable-list li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.expandable-list li:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Item Header */
.expandable-list .item-header {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
}

/* Image */
.expandable-list .item-header img {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain; /* shows full image while preserving aspect ratio */
  display: block;
  margin-right: 30px;
  border-radius: 2px;
}

/* Special background for Skatelligence logo */
.expandable-list .item-header img[src="images/Skatelligence_logo_icon.png"] {
  background-color: #212931;
}

/* Item Info */
.expandable-list .item-header .item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.expandable-list .item-header .item-title {
  font-size: 1rem;
  font-weight: bold;
  flex-grow: 1;
}

.expandable-list .item-extra {
  max-height: none;      /* Always allow full height */
  overflow: visible;     /* No clipping */
  padding: 10px;         /* Always display with desired padding */
  transition: none;      /* Remove animation */
}

/* Override Actions Container Styling */
.expandable-list .actions {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.expandable-list .actions li {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 600px) {
  /* Change header layout to column */
  .expandable-list .item-header {
    flex-direction: column;
    align-items: center;
  }
  
  /* Reorder image to come after the title */
  .expandable-list .item-header img {
    order: 2;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  /* Flatten the info container so title and description can be ordered separately */
  .expandable-list .item-info {
    display: contents;
  }
  
  /* Place title at the top */
  .expandable-list .item-title {
    order: 1;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  
  /* Place description after the image */
  .expandable-list .item-description {
    order: 3;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  
  /* Place the button last (if it exists) */
  .expandable-list .actions {
    order: 4;
    width: 100%;
    text-align: center;
  }
}
