/* ========================================
   CHECKOUT PAGE ENHANCEMENTS
   Pickup & Delivery Options
   ======================================== */

/* ========================================
   MAIN CHECKOUT LAYOUT
   ======================================== */

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.checkout-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
  background: linear-gradient(135deg, var(--fg-primary) 0%, var(--fg-primary-light) 100%);
  border-radius: 20px;
  color: var(--fg-text-white);
}

.checkout-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.checkout-header p {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

/* ========================================
   ORDER TYPE SELECTION
   ======================================== */

.order-type-selection {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
}

.order-type-selection h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 25px 0;
  text-align: center;
}

.order-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.order-type-option {
  background: var(--fg-bg-primary);
  border: 3px solid var(--fg-border-light);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.order-type-option:hover {
  border-color: var(--fg-secondary);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 107, 53, 0.1);
}

.order-type-option.selected {
  border-color: var(--fg-secondary);
  background: rgba(255, 107, 53, 0.05);
  box-shadow: 0 15px 35px rgba(255, 107, 53, 0.2);
}

.order-type-option.selected::before {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: var(--fg-secondary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

.order-type-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--fg-bg-secondary);
}

.order-type-option.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--fg-border-light);
}

.order-type-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--fg-secondary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 2rem;
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.order-type-option.disabled .order-type-icon {
  background: var(--fg-text-secondary);
  box-shadow: none;
}

.order-type-option h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 10px 0;
}

.order-type-option p {
  color: var(--fg-text-secondary);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.order-type-option .estimated-time {
  background: var(--fg-bg-secondary);
  border-radius: 20px;
  padding: 8px 16px;
  margin-top: 15px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-text-primary);
  display: inline-block;
}

/* ========================================
   DELIVERY SECTION
   ======================================== */

.delivery-section {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
  display: none;
}

.delivery-section.active {
  display: block;
  animation: slideInUp 0.6s ease-out;
}

.delivery-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.delivery-section h2 i {
  color: var(--fg-secondary);
  font-size: 1.5rem;
}

/* ========================================
   PICKUP SECTION
   ======================================== */

.pickup-section {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
  display: none;
}

.pickup-section.active {
  display: block;
  animation: slideInUp 0.6s ease-out;
}

.pickup-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.pickup-section h2 i {
  color: var(--fg-secondary);
  font-size: 1.5rem;
}

/* ========================================
   RESTAURANT INFO CARD
   ======================================== */

.restaurant-info-card {
  background: var(--fg-bg-secondary);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border-left: 4px solid var(--fg-secondary);
}

.restaurant-info-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg-text-primary);
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.restaurant-info-card h3 i {
  color: var(--fg-secondary);
}

.restaurant-details {
  display: grid;
  gap: 10px;
}

.restaurant-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--fg-border-light);
}

.restaurant-detail:last-child {
  border-bottom: none;
}

.restaurant-detail .label {
  color: var(--fg-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.restaurant-detail .value {
  color: var(--fg-text-primary);
  font-weight: 600;
  font-size: 14px;
}

.restaurant-detail .status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.restaurant-detail .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg-success);
  animation: pulse 2s infinite;
}

.restaurant-detail .status-indicator.closed {
  background: var(--fg-error);
  animation: none;
}

/* ========================================
   ENHANCED MAP CONTAINER
   ======================================== */

.map-container {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid var(--fg-border-light);
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container #map {
  width: 100%;
  height: 400px;
  border-radius: 15px;
}

.map-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 10px;
  font-size: 12px;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid var(--fg-border-light);
}

.map-overlay h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-text-primary);
}

.map-overlay p {
  margin: 0;
  color: var(--fg-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

/* ========================================
   ADDRESS SEARCH
   ======================================== */

.address-search-container {
  background: var(--fg-bg-secondary);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
}

.address-search-container h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg-text-primary);
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-search-container h3 i {
  color: var(--fg-secondary);
}

.search-input-group {
  display: flex;
  gap: 0;
  margin-bottom: 15px;
}

.search-input-group input {
  flex: 1;
  border: 2px solid var(--fg-border-light);
  border-radius: 10px 0 0 10px;
  padding: 12px 15px;
  font-size: 14px;
  color: var(--fg-text-primary);
  background: var(--fg-bg-primary);
  transition: border-color 0.3s ease;
}

.search-input-group input:focus {
  border-color: var(--fg-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-input-group button {
  border: 2px solid var(--fg-border-light);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: var(--fg-secondary-gradient);
  color: white;
  padding: 12px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-input-group button:hover {
  background: var(--fg-secondary-gradient-hover);
  transform: translateY(-1px);
}

/* ========================================
   ADDRESS FORM FIELDS
   ======================================== */

.address-form {
  background: var(--fg-bg-secondary);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
}

.address-form h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg-text-primary);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-form h3 i {
  color: var(--fg-secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--fg-text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--fg-border-light);
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg-text-primary);
  background: var(--fg-bg-primary);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--fg-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input[readonly] {
  background: var(--fg-bg-secondary);
  color: var(--fg-text-secondary);
  cursor: not-allowed;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-help {
  font-size: 12px;
  color: var(--fg-text-secondary);
  margin-top: 5px;
  line-height: 1.4;
}

/* ========================================
   DELIVERY STATUS
   ======================================== */

.delivery-status {
  background: var(--fg-bg-secondary);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  border-left: 4px solid var(--fg-secondary);
}

.delivery-status.success {
  border-left-color: var(--fg-success);
  background: var(--fg-success-light);
}

.delivery-status.error {
  border-left-color: var(--fg-error);
  background: var(--fg-error-light);
}

.delivery-status.warning {
  border-left-color: var(--fg-warning);
  background: var(--fg-warning-light);
}

.delivery-status h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.delivery-status.success h4 {
  color: var(--fg-success);
}

.delivery-status.error h4 {
  color: var(--fg-error);
}

.delivery-status.warning h4 {
  color: var(--fg-warning);
}

.delivery-status p {
  margin: 0;
  color: var(--fg-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ========================================
   PICKUP TIME SELECTION
   ======================================== */

.pickup-time-selection {
  background: var(--fg-bg-secondary);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
}

.pickup-time-selection h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg-text-primary);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pickup-time-selection h3 i {
  color: var(--fg-secondary);
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.time-slot {
  background: var(--fg-bg-primary);
  border: 2px solid var(--fg-border-light);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.time-slot:hover {
  border-color: var(--fg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.1);
}

.time-slot.selected {
  border-color: var(--fg-secondary);
  background: rgba(255, 107, 53, 0.1);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.time-slot.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--fg-bg-secondary);
}

.time-slot.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--fg-border-light);
}

.time-slot .time {
  font-weight: 600;
  color: var(--fg-text-primary);
  font-size: 14px;
}

.time-slot .status {
  font-size: 12px;
  color: var(--fg-text-secondary);
  margin-top: 5px;
}

.time-slot .status.available {
  color: var(--fg-success);
}

.time-slot .status.unavailable {
  color: var(--fg-error);
}

/* ========================================
   ENHANCED ORDER SUMMARY
   ======================================== */

.ul-cart-expense-overview {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
  position: sticky;
  top: 20px;
}

.ul-cart-expense-overview-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 25px 0;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--fg-border-light);
}

.ul-cart-expense-overview .middle {
  margin-bottom: 20px;
}

.ul-cart-expense-overview .single-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--fg-border-light);
}

.ul-cart-expense-overview .single-row:last-child {
  border-bottom: none;
}

.ul-cart-expense-overview .inner-title {
  color: var(--fg-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.ul-cart-expense-overview .number {
  color: var(--fg-text-primary);
  font-weight: 600;
  font-size: 14px;
}

.ul-cart-expense-overview .bottom {
  border-top: 2px solid var(--fg-border-light);
  padding-top: 20px;
  margin-top: 20px;
}

.ul-cart-expense-overview .bottom .single-row {
  border-bottom: none;
  padding: 15px 0;
}

.ul-cart-expense-overview .bottom .inner-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg-text-primary);
}

.ul-cart-expense-overview .bottom .number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-secondary);
}

/* ========================================
   ENHANCED PAYMENT METHODS
   ======================================== */

.payment-methods {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
}

.payment-methods h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg-text-primary);
  margin: 0 0 25px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.payment-methods h3 i {
  color: var(--fg-secondary);
  font-size: 1.5rem;
}

.payment-options {
  display: grid;
  gap: 15px;
}

.payment-option {
  background: var(--fg-bg-primary);
  border: 2px solid var(--fg-border-light);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.payment-option:hover {
  border-color: var(--fg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.1);
}

.payment-option.selected {
  border-color: var(--fg-secondary);
  background: rgba(255, 107, 53, 0.05);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.payment-option.selected::before {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  width: 25px;
  height: 25px;
  background: var(--fg-secondary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.payment-option .form-check {
  margin: 0;
  padding: 0;
}

.payment-option .form-check-input {
  margin: 0;
  margin-right: 15px;
}

.payment-option .form-check-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  font-weight: 600;
  color: var(--fg-text-primary);
}

.payment-option .payment-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--fg-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
  color: var(--fg-secondary);
}

/* ========================================
   ENHANCED CHECKOUT BUTTON
   ======================================== */

.checkout-actions {
  background: var(--fg-bg-primary);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--fg-border-light);
  text-align: center;
}

.ul-cart-checkout-direct-btn {
  background: var(--fg-secondary-gradient);
  color: var(--fg-text-white);
  border: none;
  border-radius: 15px;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  justify-content: center;
}

.ul-cart-checkout-direct-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ul-cart-checkout-direct-btn .btn-loading {
  display: none;
}

.ul-cart-checkout-direct-btn.loading .btn-text {
  display: none;
}

.ul-cart-checkout-direct-btn.loading .btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .checkout-container {
    padding: 15px;
  }
  
  .checkout-header h1 {
    font-size: 2rem;
  }
  
  .order-type-options {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .time-slots {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .ul-cart-checkout-direct-btn {
    min-width: auto;
    width: 100%;
  }
  
  .map-container #map {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .checkout-header {
    padding: 20px;
  }
  
  .checkout-header h1 {
    font-size: 1.8rem;
  }
  
  .order-type-selection,
  .delivery-section,
  .pickup-section,
  .payment-methods,
  .checkout-actions {
    padding: 20px;
  }
  
  .order-type-option {
    padding: 20px;
  }
  
  .order-type-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* ========================================
   ANIMATION ENHANCEMENTS
   ======================================== */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.order-type-selection,
.delivery-section,
.pickup-section,
.payment-methods {
  animation: slideInUp 0.6s ease-out;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

.order-type-option:focus,
.time-slot:focus,
.payment-option:focus {
  outline: 3px solid var(--fg-secondary-light);
  outline-offset: 2px;
}

.ul-cart-checkout-direct-btn:focus {
  outline: 3px solid var(--fg-secondary-light);
  outline-offset: 2px;
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */

@media (prefers-contrast: high) {
  .order-type-option,
  .time-slot,
  .payment-option {
    border: 3px solid var(--fg-text-primary);
  }
  
  .order-type-option.selected,
  .time-slot.selected,
  .payment-option.selected {
    border-color: var(--fg-secondary);
    background: var(--fg-bg-primary);
  }
}
