/**
 * @file
 * FlowDrop Detail Grid Component Styles
 *
 * Provides styling for key-value detail displays.
 */

.fd-detail-grid {
  display: grid;
  gap: var(--fd-space-4);
  margin: 0;
  padding: 0;
}

/* Column configurations */
.fd-detail-grid--columns-auto {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.fd-detail-grid--columns-1 {
  grid-template-columns: 1fr;
}

.fd-detail-grid--columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.fd-detail-grid--columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.fd-detail-grid--columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive columns */
@media (max-width: 768px) {
  .fd-detail-grid--columns-3,
  .fd-detail-grid--columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .fd-detail-grid--columns-2,
  .fd-detail-grid--columns-3,
  .fd-detail-grid--columns-4 {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================
 * ITEM
 * ======================================================================== */

.fd-detail-grid__item {
  display: flex;
  flex-direction: column;
  gap: var(--fd-space-1);
  padding: var(--fd-space-3);
  background-color: var(--fd-color-gray-50);
  border-radius: var(--fd-radius-lg);
}

/* Column span modifiers */
.fd-detail-grid__item--span-2 {
  grid-column: span 2;
}

.fd-detail-grid__item--span-full {
  grid-column: 1 / -1;
}

@media (max-width: 480px) {
  .fd-detail-grid__item--span-2 {
    grid-column: span 1;
  }
}

/* ========================================================================
 * LABEL
 * ======================================================================== */

.fd-detail-grid__label {
  display: flex;
  align-items: center;
  gap: var(--fd-space-2);
  margin: 0;
  font-size: var(--fd-font-size-xs);
  font-weight: var(--fd-font-weight-medium);
  color: var(--fd-color-gray-500);
  text-transform: uppercase;
  letter-spacing: var(--fd-letter-spacing-wide);
}

.fd-detail-grid__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.fd-detail-grid__icon svg {
  width: 100%;
  height: 100%;
}

/* ========================================================================
 * VALUE
 * ======================================================================== */

.fd-detail-grid__value {
  margin: 0;
  font-size: var(--fd-font-size-sm);
  font-weight: var(--fd-font-weight-medium);
  color: var(--fd-color-gray-900);
  line-height: var(--fd-line-height-normal);
  word-break: break-word;
}

.fd-detail-grid__value--mono {
  font-family: var(--fd-font-family-mono);
  font-size: var(--fd-font-size-xs);
}

.fd-detail-grid__link {
  color: var(--fd-color-primary-600);
  text-decoration: none;
}

.fd-detail-grid__link:hover {
  text-decoration: underline;
}

/* ========================================================================
 * VARIANT STYLES
 * ======================================================================== */

.fd-detail-grid__item--success {
  background-color: var(--fd-color-success-50);
}

.fd-detail-grid__item--success .fd-detail-grid__label {
  color: var(--fd-color-success-700);
}

.fd-detail-grid__item--success .fd-detail-grid__value {
  color: var(--fd-color-success-800);
}

.fd-detail-grid__item--warning {
  background-color: var(--fd-color-warning-50);
}

.fd-detail-grid__item--warning .fd-detail-grid__label {
  color: var(--fd-color-warning-700);
}

.fd-detail-grid__item--warning .fd-detail-grid__value {
  color: var(--fd-color-warning-800);
}

.fd-detail-grid__item--error {
  background-color: var(--fd-color-error-50);
}

.fd-detail-grid__item--error .fd-detail-grid__label {
  color: var(--fd-color-error-700);
}

.fd-detail-grid__item--error .fd-detail-grid__value {
  color: var(--fd-color-error-800);
}

.fd-detail-grid__item--info {
  background-color: var(--fd-color-info-50);
}

.fd-detail-grid__item--info .fd-detail-grid__label {
  color: var(--fd-color-info-600);
}

.fd-detail-grid__item--info .fd-detail-grid__value {
  color: var(--fd-color-primary-700);
}
