/* Budget Modal Styles */

.budget-modal {
  width: 100%;
}

.budget-modal__header {
  margin-bottom: 1.5rem;
}

.budget-modal__description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.budget-modal__add-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.budget-modal__add-btn:hover {
  background: #2563eb;
}

.budget-modal__line-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.budget-modal__empty {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
  font-style: italic;
}

.budget-modal__line-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
}

.budget-modal__line-item-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.budget-modal__field {
  display: flex;
  flex-direction: column;
}

.budget-modal__field--small {
  max-width: 120px;
}

.budget-modal__field--description {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.budget-modal__field--readonly {
  opacity: 0.8;
}

.budget-modal__field--actions {
  align-self: end;
  padding-bottom: 0.25rem;
}

.budget-modal__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.budget-modal__select,
.budget-modal__input {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  width: 100%;
  background: white;
  transition: border-color 0.2s;
}

.budget-modal__select:focus,
.budget-modal__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.budget-modal__input--readonly {
  background: #f3f4f6;
  cursor: not-allowed;
}

.budget-modal__remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.budget-modal__remove-btn:hover {
  background: #dc2626;
}

.budget-modal__totals {
  border-top: 2px solid #e5e7eb;
  padding-top: 1rem;
  margin-top: 1rem;
}

.budget-modal__totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.budget-modal__totals-row:last-child {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.budget-modal__totals-label {
  color: #6b7280;
  font-weight: 500;
}

.budget-modal__totals-row:last-child .budget-modal__totals-label {
  color: #1f2937;
}

.budget-modal__totals-value {
  font-weight: 500;
  color: #374151;
}

.budget-modal__totals-value--amount {
  color: #059669;
  font-weight: 600;
}

.budget-modal__totals-separator {
  color: #9ca3af;
  margin: 0 0.5rem;
}
