/* Order & Payment Page Styles */
:root {
  --primary-color: #01FF01;
  --primary-dark: #00cc00; 
  --secondary-color: #ff9a76;
  --text-color: #333;
  --light-gray: #f8f8f8;
  --medium-gray: #e0e0e0;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --success-color: #4CAF50;
  --error-color: #f44336;
  --razorpay-blue: #528FF0;
}

body {
  font-family: 'Poppins', sans-serif;
}

/* Order Section Styles */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-color);
  font-size: 2.2rem;
  font-weight: 600;
}

.order-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .order-container {
    grid-template-columns: 1fr;
  }
}

/* Order Summary Styles */
.order-summary {
  background-color: var(--light-gray);
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
  padding: 2rem;
}

.order-summary h3, .delivery-details h3 {
  color: var(--text-color);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.order-summary h3 i, .delivery-details h3 i {
  margin-right: 10px;
  color: var(--primary-dark);
}

.order-item {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: relative;
  gap: 10px;
}

.order-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
}

.order-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-details {
  flex: 1 1 calc(100% - 120px); /* Allow item details to take proper space */
  min-width: 200px;
}

.order-item-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.order-item-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.order-item-price {
  font-weight: 600;
  color: var(--primary-dark);
}

.order-item-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90px; /* Reduced from 120px */
  position: static; /* Changed from absolute to static */
  margin-top: 8px;
  margin-left: auto; /* Push to the right */
}

.quantity-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: white;
}

.quantity-value {
  font-weight: 600;
}

.order-totals {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-color);
}

.order-subtotal, .order-tax, .order-delivery {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.order-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Delivery Details Styles */
.delivery-details {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
  padding: 2rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
}

.form-group {
  flex: 1;
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(1, 255, 1, 0.1);
}

/* Payment Section Styles */
.payment-section {
  text-align: center;
  margin-top: 2rem;
}

.pay-button {
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  border-radius: 50px;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pay-button i {
  margin-right: 10px;
}

.pay-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 204, 0, 0.2);
}

.secure-payment {
  margin-top: 15px;
  color: #666;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secure-payment i {
  margin-right: 5px;
  color: var(--success-color);
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.spinner {
  border: 4px solid var(--medium-gray);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

/* Payment Overlay Styles */
.payment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.payment-overlay.active {
  opacity: 1;
  visibility: visible;
}

.payment-popup {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.payment-overlay.active .payment-popup {
  transform: scale(1);
}

.payment-header {
  background: linear-gradient(135deg, #F8FFF8 0%, #EAFFEA 100%);
  padding: 25px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.payment-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.payment-logo img {
  height: 60px;
}

.payment-header h2 {
  color: var(--text-color);
  font-weight: 600;
  margin: 0;
}

.payment-body {
  padding: 25px;
}

.payment-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: 8px;
  margin-bottom: 20px;
}

.meal-name {
  font-weight: 600;
  color: var(--text-color);
}

.meal-price {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.payment-methods h4 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1rem;
}

.payment-options {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.payment-option {
  flex: 1;
  min-width: 100px;
  padding: 12px;
  background-color: var(--light-gray);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
}

.payment-option i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #555;
}

.payment-option span {
  font-size: 0.85rem;
  font-weight: 500;
}

.payment-option.active {
  border-color: var(--primary-color);
  background-color: rgba(1, 255, 1, 0.05);
}

.payment-option.active i {
  color: var(--primary-dark);
}

.payment-footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--light-gray);
}

.secure-badge {
  display: flex;
  align-items: center;
  color: var(--success-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.secure-badge i {
  margin-right: 5px;
}

.payment-icons {
  display: flex;
  gap: 10px;
}

.payment-icons i {
  font-size: 1.4rem;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.payment-icons i:hover {
  opacity: 1;
}

.close-payment {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #555;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all 0.3s;
}

.close-payment:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Razorpay Container */
.razorpay-container {
  margin-top: 20px;
}

.razorpay-payment-button {
  display: block;
  width: 100%;
  background-color: var(--razorpay-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.razorpay-payment-button:hover {
  background-color: #3F7AE0;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(82, 143, 240, 0.2);
}

/* Success Animation */
.payment-success {
  text-align: center;
  padding: 30px 25px;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background-color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  animation: scale-in 0.5s ease-out;
}

.payment-success h3 {
  color: var(--text-color);
  margin-bottom: 10px;
  animation: fade-in 0.5s ease-out 0.2s both;
}

.payment-success p {
  color: #666;
  margin-bottom: 25px;
  animation: fade-in 0.5s ease-out 0.4s both;
}

.view-order-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  animation: fade-in 0.5s ease-out 0.6s both;
  text-decoration: none;
}

.view-order-btn:hover {
  background-color: var(--primary-dark);
}

@keyframes scale-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fade-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .order-item-quantity {
    position: static;
    margin-top: 10px;
  }
  
  .order-item {
    flex-direction: column;
  }
  
  .order-item-image {
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .payment-footer {
    flex-direction: column;
    gap: 15px;
  }
  
  .payment-options {
    flex-direction: column;
  }
  
  .payment-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
  }
  
  .payment-option i {
    margin-right: 10px;
    margin-bottom: 0;
  }
}
