* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f5f5f5;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.section {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

h2 {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 5px;
}

button:hover {
  background-color: #45a049;
}

#generateBtn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-top: 20px;
}

.item-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.remove-item {
  background-color: #f44336;
  height: 38px;
}

.remove-item:hover {
  background-color: #d32f2f;
}

#addItemBtn {
  background-color: #2196F3;
  margin-top: 10px;
}

#addItemBtn:hover {
  background-color: #0b7dda;
}

/* Loading indicator */
#loadingIndicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: white;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid white;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success message */
#successMessage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.success-content {
  background-color: white;
  padding: 30px;
  border-radius: 5px;
  text-align: center;
  max-width: 400px;
}

.success-content h3 {
  color: #4CAF50;
  margin-bottom: 15px;
}

#newInvoiceBtn {
  margin-top: 20px;
  background-color: #4CAF50;
}

/* Invoice summary */
#invoiceSummary {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1em;
  border-top: 1px solid #ddd;
  padding-top: 8px;
  margin-top: 8px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .item-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .item-row .form-group {
    width: 100%;
  }
  
  .remove-item {
    width: 100%;
  }
} 