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

.fd-detail-section {
  background-color: var(--fd-surface-card);
  border: var(--fd-border-width) solid var(--fd-border-color);
  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-color);
  background-color: var(--fd-color-gray-50);
}

/* 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-color);
  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-color-gray-100);
}

.fd-detail-section--collapsible .fd-detail-section__header:focus-visible {
  outline: 2px solid var(--fd-color-primary-500);
  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-color-primary-100);
  color: var(--fd-color-primary-600);
}

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

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

.fd-detail-section__chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--fd-color-gray-500);
  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;
}
