/**
 * Group Types Description Block styling
 */

/* Compact Group Types Info */
.group-types-compact {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0 0 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.group-types-compact:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Block title */
.group-types-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

/* Show/hide titles based on viewport */
.group-types-title .title-mobile {
  display: none;
}

.group-types-title .title-desktop {
  display: inline;
}

/* Lightbulb icon styling */
.group-types-title .fa-lightbulb {
  color: #fbbf24;
  margin-right: 0.375rem;
}

/* Each group type as a row */
.group-type-item {
  display: block;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}

.group-type-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Header with icon and label */
.group-type-item strong {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.group-type-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.group-type-item .fa-globe {
  color: #10b981;
}

.group-type-item .fa-lock-open {
  color: #f59e0b;
}

.group-type-item .fa-lock {
  color: #ef4444;
}

/* Description text */
.group-type-item span {
  display: block;
  padding-left: 1.875rem; /* Align with text after icon */
  color: #6b7280;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Mobile - expandable behavior */
@media (max-width: 640px) {
  .group-types-compact {
    padding: 1rem;
    cursor: pointer;
    position: relative;
    transition: max-height 0.4s ease-out;
  }

  /* Collapsed state - show only title */
  .group-types-compact.collapsed {
    overflow: hidden;
    max-height: 60px;
    display: flex;
    align-items: center;
  }

  /* Expanded state */
  .group-types-compact.expanded {
    max-height: 600px; /* Enough to show all content */
    display: block;
  }

  /* Switch to mobile title */
  .group-types-title .title-mobile {
    display: inline-flex;
    align-items: center;
  }

  .group-types-title .title-desktop {
    display: none;
  }

  /* Title adjustments for mobile */
  .group-types-title {
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
    width: 100%;
  }

  /* Add border only when expanded */
  .group-types-compact.expanded .group-types-title {
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
  }

  /* Add expand indicator to title */
  .group-types-title::after {
    content: "\f078"; /* Font Awesome chevron down */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.75rem;
    color: #6b7280;
    transition: transform 0.3s ease;
    flex-shrink: 0;
  }

  .group-types-compact.expanded .group-types-title::after {
    transform: rotate(180deg);
  }

  /* Adjust spacing for mobile */
  .group-type-item {
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
  }

  .group-type-item strong {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }

  .group-type-item i {
    font-size: 0.875rem;
  }

  /* Hide descriptions when collapsed */
  .group-types-compact.collapsed .group-type-item span {
    display: none;
  }

  .group-types-compact.expanded .group-type-item span {
    display: block;
    padding-left: 1.625rem;
    font-size: 0.75rem;
  }

  /* Hide entire items when collapsed on mobile */
  .group-types-compact.collapsed .group-type-item {
    display: none;
  }

  .group-types-compact.expanded .group-type-item {
    display: block;
  }

  /* Add tap feedback on mobile */
  .group-types-compact:active {
    background: #f9fafb;
  }

  /* Make entire block feel tappable */
  .group-types-compact {
    -webkit-tap-highlight-color: rgba(125, 17, 255, 0.1);
    user-select: none;
  }
}
