/* Release 3 — Items + Pricing tab styles. */

.items-tab,
.pricing-tab {
  gap: 1.25rem;
}

.items-sections {
  gap: 1rem;
}

.items-section {
  border-left: 4px solid var(--color-accent, #c9a84c);
}

.items-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.items-section__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 12rem;
}

.items-section__title {
  font-family: var(--font-display, "Playfair Display", serif);
  font-size: 1.125rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.25rem 0.5rem;
  flex: 1 1 auto;
}

.items-section__title:focus {
  border-color: var(--color-border, #e5e7eb);
  background: #fff;
}

.items-section__empty {
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
  padding: 0.75rem 0;
}

.items-section__footer {
  margin-top: 0.75rem;
}

.items-table-wrapper {
  overflow-x: auto;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.items-table th,
.items-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  vertical-align: middle;
  text-align: left;
}

.items-table th {
  background: #f8fafc;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: var(--color-text-muted, #6b7280);
}

.items-table input,
.items-table select {
  width: 100%;
  min-width: 4rem;
}

.items-row__name {
  min-width: 10rem;
}

.items-row__extended {
  font-weight: 600;
  white-space: nowrap;
}

.items-row.is-excluded {
  opacity: 0.55;
}

.input--qty {
  max-width: 6rem;
}

.input--unit {
  max-width: 5rem;
}

.input--money {
  max-width: 7rem;
}

/* Pricing grid */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  }
}

.pricing-grid__left,
.pricing-grid__right {
  gap: 1rem;
}

.pricing-card {
  padding: 0;
}

.toggle-row {
  display: flex;
  gap: 0.5rem;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field-label {
  font-weight: 600;
  color: var(--color-text, #2d2d2d);
}

.pricing-totals__grid {
  display: grid;
  gap: 0.5rem;
}

.pricing-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  font-size: 0.95rem;
}

.pricing-totals__row.is-grand {
  border-top: 2px solid var(--color-accent, #c9a84c);
  border-bottom: none;
  font-size: 1.125rem;
  font-weight: 700;
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}

.pricing-totals__label {
  color: var(--color-text-muted, #6b7280);
}

.pricing-totals__value {
  font-weight: 600;
  color: var(--color-text, #2d2d2d);
}

.pricing-totals__row.is-grand .pricing-totals__label,
.pricing-totals__row.is-grand .pricing-totals__value {
  color: var(--color-text, #191265);
}

.badge--primary {
  background: var(--color-primary, #191265);
  color: #fff;
}

.muted {
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
}
