/**
 * @file
 * FlowDrop Detail Section Component Styles
 *
 * Provides styling for detail page sections with optional collapse.
 */

.fd-detail-section {
  background-color: var(--fd-card);
  border: var(--fd-border-width) solid var(--fd-border);
  border-radius: var(--fd-radius-xl);
  overflow: hidden;
}

.fd-detail-section + .fd-detail-section {
  margin-block-start: var(--fd-space-4);
}

/* ========================================================================
 * HEADER
 * ======================================================================== */

.fd-detail-section__header {
  display: flex;
  align-items: center;
  gap: var(--fd-space-3);
  padding: var(--fd-space-4) var(--fd-space-5);
  border-block-end: var(--fd-border-width) solid var(--fd-border);
  background-color: var(--fd-muted);
}

/* Collapsible header button */
.fd-detail-section--collapsible .fd-detail-section__header {
  width: 100%;
  margin: 0;
  border: none;
  border-block-end: var(--fd-border-width) solid var(--fd-border);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--fd-transition-fast);
}

.fd-detail-section--collapsible .fd-detail-section__header:hover {
  background-color: var(--fd-subtle);
}

.fd-detail-section--collapsible .fd-detail-section__header:focus-visible {
  outline: 2px solid var(--fd-primary);
  outline-offset: -2px;
}

.fd-detail-section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--fd-radius-md);
  background-color: var(--fd-primary-muted);
  color: var(--fd-primary-hover);
}

.fd-detail-section__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.fd-detail-section__title {
  flex: 1;
  margin: 0;
  font-size: var(--fd-text-base);
  font-weight: var(--fd-font-weight-semibold);
  color: var(--fd-foreground);
}

.fd-detail-section__chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--fd-muted-foreground);
  transition: transform var(--fd-transition-fast);
}

.fd-detail-section__header[aria-expanded="true"] .fd-detail-section__chevron {
  transform: rotate(180deg);
}

/* ========================================================================
 * CONTENT
 * ======================================================================== */

.fd-detail-section__content {
  padding: var(--fd-space-5);
}

/* Collapsed state */
.fd-detail-section__content--collapsed {
  display: none;
}
