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

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

.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;
  cursor: pointer;
  transition: background-color var(--fd-transition-fast);
  text-align: left;
  border: none;
  border-block-end: var(--fd-border-width) solid var(--fd-border);
}

.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;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--fd-primary-hover);
  border-radius: var(--fd-radius-md);
  background-color: var(--fd-primary-muted);
}

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

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

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

.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;
}
