/* static/css/checkout.css */

/* Checkout Container */
#checkout-container {
  margin-top: 20px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Sections */
.form-section {
  margin-bottom: 30px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
}

/* Form Fields */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 15px;
  transition: all 0.2s ease-in-out;
}

.form-group input:focus {
  outline: none;
  border-color: #800000;
  box-shadow: 0 0 0 2px rgba(128, 0, 0, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Order Summary */
.order-summary {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  align-self: start;
}

.order-summary h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
}

.checkout-item {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.checkout-item-details {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.checkout-item-price {
  font-weight: bold;
  color: #800000;
}

#checkout-items {
  margin-bottom: 20px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Summary Rows */
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row.total {
  font-weight: bold;
  font-size: 18px;
  padding-top: 15px;
  margin-top: 5px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.checkout-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  font-size: 15px;
  transition: all 0.2s ease;
}

.back-btn {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.back-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkout-btn {
  background-color: #800000;
  color: white;
}

.checkout-btn:hover {
  background-color: #9a0000;
}

.checkout-btn:disabled {
  background-color: #666;
  cursor: not-allowed;
}

/* Order Confirmation */
#order-confirmation {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.confirmation-container {
  text-align: center;
  max-width: 600px;
  padding: 40px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.confirmation-container i {
  font-size: 60px;
  color: #4CAF50;
  margin-bottom: 20px;
}

.confirmation-container h2 {
  margin-bottom: 20px;
}

.order-number {
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Animate the appearance of the confirmation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#order-confirmation {
  animation: fadeIn 0.5s ease-out;
}