.rd-checkout-container {
  max-width: 800px;
  margin: 2rem auto;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  font-family: "Vazirmatn", sans-serif;
}

.rd-checkout-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.rd-progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #9ca3af;
  transition: color 0.3s;
}
.rd-step-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.3s;
}
.rd-step-label {
  font-weight: 500;
}
.rd-progress-step.active {
  color: #a12027;
}
.rd-progress-step.active .rd-step-icon {
  border-color: #a12027;
  background-color: #a12027;
  color: #fff;
}
.rd-progress-line {
  flex-grow: 1;
  height: 2px;
  background-color: #d1d5db;
  margin: 0 1rem;
}

.rd-checkout-content {
  padding: 2rem;
}
.rd-checkout-step-content {
  display: none;
}
.rd-checkout-step-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}
.rd-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #1f2937;
}

.rd-loader-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.rd-cart-table-wrapper {
  overflow-x: auto;
}
.rd-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  min-width: 600px;
}
.rd-cart-table th,
.rd-cart-table td {
  text-align: right;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.rd-cart-table th {
  font-weight: 600;
  font-size: 0.9rem;
  color: #6b7280;
}
.rd-cart-table .product-name {
  font-weight: 600;
}
.rd-cart-table .price-col .price-in-words {
  font-size: 0.8em;
  color: #6b7280;
  display: block;
}
.rd-cart-table .quantity {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  overflow: hidden;
  max-width: 120px;
}
.rd-cart-table .quantity .qty {
  width: 40px;
  text-align: center;
  border: none;
  outline: none;
  -moz-appearance: textfield;
  padding: 0.5rem;
  background: transparent;
}
.rd-cart-table .quantity .qty::-webkit-inner-spin-button,
.rd-cart-table .quantity .qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rd-cart-table .quantity .quantity-btn {
  background: #f9fafb;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
  line-height: 1;
  color: #6b7280;
}
.rd-cart-table .quantity .minus .dashicons-trash {
  color: #ef4444;
}
@media (hover: hover) {
  .rd-cart-table .quantity .quantity-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
  }
}
.rd-cart-totals {
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 2px solid #1f2937;
  padding-top: 1rem;
}
.rd-cart-totals .price-in-words {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
  color: #6b7280;
}
.rd-cart-totals span {
  margin-right: 1rem;
  color: #a12027;
}
.rd-cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}
.rd-cart-actions .button {
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.rd-cart-actions .rd-continue-shopping-btn {
  background-color: #e5e7eb;
  color: #374151;
}
.rd-cart-actions .rd-proceed-checkout-btn {
  background-color: #a12027;
  color: #fff;
}

@media (max-width: 767px) {
  .rd-checkout-progress {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
  }
  .rd-progress-step {
    flex-basis: 33%;
    justify-content: center;
  }
  .rd-progress-line {
    display: none;
  }
  .rd-checkout-content {
    padding: 1.5rem 1rem;
  }
  .rd-cart-table thead {
    display: none;
  }
  .rd-cart-table,
  .rd-cart-table tbody,
  .rd-cart-table tr,
  .rd-cart-table td {
    display: block;
  }
  .rd-cart-table tr {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  .rd-cart-table td {
    padding: 0.5rem 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .rd-cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #1f2937;
  }
  .rd-cart-table .product-name {
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed #e5e7eb;
  }
  .rd-cart-table .product-name::before {
    display: none;
  }
  .rd-cart-table .product-remove {
    display: none;
  }
}

.rd-route-search-wrapper {
  margin-bottom: 1.5rem;
}
#rd-route-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
}
.rd-routes-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}
.rd-route-item {
  border-bottom: 1px solid #e5e7eb;
}
.rd-route-item:last-child {
  border-bottom: none;
}
.rd-route-item-header {
  padding: 1rem;
  font-weight: 700;
  background-color: #f9fafb;
}
.rd-stop-item {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background-color 0.2s;
}
@media (hover: hover) {
  .rd-stop-item:hover {
    background-color: #f3f4f6;
  }
}
.rd-stop-item.selected {
  background-color: #fbeaec;
  border-right: 4px solid #a12027;
}
.rd-stop-item input {
  display: none;
}
.rd-stop-details {
  flex-grow: 1;
}
.rd-stop-name {
  font-weight: 600;
  color: #1f2937;
}
.rd-stop-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
}
.rd-stop-meta span:not(:last-child)::after {
  content: "•";
  margin: 0 0.5rem;
}

.rd-order-note-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.rd-checkout-navigation {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.rd-checkout-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-decoration: none;
}
.rd-btn-prev,
.rd-btn-back-to-cart {
  background-color: #e5e7eb;
  color: #374151;
}
.rd-btn-next,
.rd-btn-pay {
  background-color: #a12027;
  color: #fff;
}
.rd-btn-next:disabled,
.rd-btn-pay:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

#rd-order-review-container .woocommerce-checkout-review-order {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}
#rd-order-review-container .shop_table {
  border: none;
  border-radius: 0;
}
#rd-order-review-container #payment {
  background: #f9fafb;
  border-radius: 0.5rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rd-cart-empty-wrapper {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rd-cart-empty-wrapper .dashicons {
  font-size: 3rem;
  width: 3rem;
  height: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.rd-cart-empty-wrapper p {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.rd-cart-empty-wrapper .rd-go-to-shop-btn {
  background-color: #a12027;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

@media (hover: hover) {
  .rd-cart-empty-wrapper .rd-go-to-shop-btn:hover {
    background-color: #7c1a1f;
    color: #fff;
  }
}

/* New Auth Styles */
.rd-checkout-auth-wrapper {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}
.rd-auth-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
}
.rd-input-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.rd-input-modern:focus {
  border-color: #a12027;
  outline: none;
}
.rd-text-center {
  text-align: center;
  letter-spacing: 2px;
}
.rd-checkout-btn {
  width: 100%;
  margin-top: 1rem;
}
.rd-btn-primary {
  background-color: #a12027;
  color: #fff;
}
.rd-btn-primary:hover {
  background-color: #7c1a1f;
}
.rd-btn-link {
  background: none;
  border: none;
  color: #6b7280;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 1rem;
}
.rd-auth-timer {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}
.rd-checkout-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
