/* ============================================
   CHECKOUT PAGE STYLES
   ============================================ */

/* Breadcrumb Section */
.egotec-breadcrumb-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 0;
  color: #fff;
  margin-bottom: 40px;
}

.egotec-breadcrumb-section .breadcrumb {
  background: transparent;
  margin-bottom: 10px;
  padding: 0;
}

.egotec-breadcrumb-section .breadcrumb-item {
  color: rgba(255, 255, 255, 0.8);
}

.egotec-breadcrumb-section .breadcrumb-item a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.egotec-breadcrumb-section .breadcrumb-item a:hover {
  opacity: 0.8;
}

.egotec-breadcrumb-section .breadcrumb-item.active {
  color: #fff;
}

.egotec-breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6);
  content: "›";
}

.egotec-page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0;
  color: #fff;
}

/* Checkout Section */
.egotec-checkout-section {
  padding: 40px 0 80px;
  background-color: #f8f9fa;
}

/* Empty Checkout State */
.egotec-empty-checkout {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.egotec-empty-checkout i {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 20px;
}

.egotec-empty-checkout h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

.egotec-empty-checkout p {
  color: #6c757d;
  margin-bottom: 30px;
}

.egotec-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.egotec-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: #fff;
}

/* Checkout Form */
.egotec-checkout-form {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.egotec-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f5;
}

.egotec-form-section {
  margin-bottom: 30px;
}

.egotec-form-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 20px;
}

.egotec-checkout-form .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.egotec-checkout-form .form-control,
.egotec-checkout-form .form-select {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.egotec-checkout-form .form-control:focus,
.egotec-checkout-form .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.egotec-checkout-form .text-danger {
  color: #dc3545;
}

/* Shipping Methods */
.egotec-shipping-methods {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.egotec-shipping-option {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.egotec-shipping-option:hover {
  background-color: #f8f9ff;
}

.egotec-shipping-option .form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
  cursor: pointer;
}

.egotec-shipping-option .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

.egotec-shipping-option .form-check-label {
  cursor: pointer;
  width: 100%;
  margin-left: 10px;
}

.egotec-shipping-option .form-check-input:checked ~ .form-check-label {
  color: #667eea;
}

.egotec-shipping-option strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}

/* Google Autocomplete Field Styling */
#full_address {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23667eea"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
  padding-right: 45px;
}

#full_address::placeholder {
  color: #6c757d;
  font-style: italic;
}

.form-control[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Order Summary */
.egotec-order-summary {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.egotec-summary-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f3f5;
  padding-bottom: 20px;
}

.egotec-summary-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f8f9fa;
}

.egotec-summary-item:last-child {
  border-bottom: none;
}

.egotec-summary-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
}

.egotec-summary-item-details {
  flex: 1;
}

.egotec-summary-item-name {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 5px;
  font-size: 0.95rem;
  display: block;
}

.egotec-summary-item-meta {
  color: #6c757d;
  font-size: 0.85rem;
}

.egotec-summary-item-price {
  font-weight: 600;
  color: #667eea;
  font-size: 1rem;
}

/* Shipping Info */
.egotec-shipping-info {
  margin-bottom: 20px;
}

.egotec-shipping-info .alert {
  border-radius: 8px;
  border: none;
  background-color: #e7f3ff;
  color: #0c5460;
}

.egotec-shipping-info .alert strong {
  display: block;
  margin-bottom: 5px;
}

/* Summary Totals */
.egotec-summary-totals {
  padding: 20px 0;
  border-bottom: 1px solid #f1f3f5;
  margin-bottom: 20px;
}

.egotec-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: #495057;
}

.egotec-totals-row span:first-child {
  font-weight: 500;
}

.egotec-totals-row span:last-child {
  font-weight: 600;
}

.egotec-total-row {
  font-size: 1.2rem;
  color: #2c3e50;
  padding-top: 15px;
  border-top: 2px solid #f1f3f5;
}

.egotec-total-row span:last-child {
  color: #667eea;
  font-weight: 700;
}

/* Place Order Button */
.egotec-btn-place-order {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.egotec-btn-place-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.egotec-btn-place-order:active {
  transform: translateY(0);
}

.egotec-btn-place-order:disabled {
  background: #dee2e6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Security Badge */
.egotec-security-badge {
  color: #6c757d;
}

.egotec-security-badge i {
  color: #28a745;
}

/* Responsive Design */
@media (max-width: 991px) {
  .egotec-order-summary {
    margin-top: 30px;
  }

  .egotec-order-summary.sticky-top {
    position: static !important;
  }
}

@media (max-width: 767px) {
  .egotec-page-title {
    font-size: 1.5rem;
  }

  .egotec-checkout-form,
  .egotec-order-summary {
    padding: 20px;
  }

  .egotec-section-title {
    font-size: 1.3rem;
  }

  .egotec-btn-place-order {
    font-size: 1rem;
    padding: 12px 20px;
  }

  .egotec-summary-item-image {
    width: 50px;
    height: 50px;
  }
}

/* Scrollbar Styling for Summary Items */
.egotec-summary-items::-webkit-scrollbar {
  width: 6px;
}

.egotec-summary-items::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.egotec-summary-items::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.egotec-summary-items::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Form Validation States */
.egotec-checkout-form .form-control.is-invalid,
.egotec-checkout-form .form-select.is-invalid {
  border-color: #dc3545;
}

.egotec-checkout-form .form-control.is-valid,
.egotec-checkout-form .form-select.is-valid {
  border-color: #28a745;
}

.invalid-feedback {
  display: block;
  margin-top: 5px;
  font-size: 0.875rem;
  color: #dc3545;
}

/* Success Message */
.egotec-success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.egotec-success-message i {
  margin-right: 10px;
  font-size: 1.5rem;
}

/* Loading State */
.egotec-btn-place-order.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.egotec-btn-place-order.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
