/* ========================================================================
   CHECKOUT PAGE STYLES - COMPLETE
   ======================================================================== */

.checkout-page {
  padding: 40px 0 80px;
  min-height: 60vh;
  background: var(--bg);
}

/* Checkout Steps */
.checkout-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 150px;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.step.completed:not(:last-child)::after {
  background: var(--accent);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
  z-index: 2;
  transition: all 0.3s ease;
}

.step.completed .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step.active .step-number {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: center;
}

.step.active .step-label {
  color: var(--text-dark);
  font-weight: 600;
}

.step.completed .step-label {
  color: var(--text-dark);
}

/* Header */
.checkout-header {
  text-align: center;
  margin-bottom: 40px;
}

.checkout-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, var(--text-dark) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.checkout-subtitle {
  color: var(--text-soft);
  font-size: 1rem;
}

/* Checkout Grid */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}

@media (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: 1fr 320px;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Checkout Cards */
.checkout-card {
  background: white;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.card-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.card-header h2 i {
  color: var(--accent);
  font-size: 1.1rem;
}

/* Address Form */
.address-form {
  max-width: 600px;
}

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

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

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

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

.required {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 140, 90, 0.1);
}

.form-control.error {
  border-color: #ef4444;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Saved Address Card */
.saved-address-card {
  background: linear-gradient(135deg, #f2ebe3 0%, white 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  border: 2px solid var(--accent-light);
}

.saved-address-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}

.saved-address-info p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.address-separator {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.address-separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-light);
  z-index: 1;
}

.address-separator span {
  background: white;
  padding: 0 15px;
  color: var(--text-soft);
  font-size: 0.8rem;
  position: relative;
  z-index: 2;
}

/* Save Address Option */
.save-address-option {
  background: var(--bg);
  border-radius: 12px;
  padding: 15px;
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Address Note */
.address-note {
  background: #e1f0fa;
  border-radius: 12px;
  padding: 12px 15px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e4a6b;
  font-size: 0.85rem;
}

.address-note i {
  font-size: 1rem;
}

/* Form Actions */
.form-actions {
  margin-top: 30px;
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
}

/* Order Summary Card */
.summary-card {
  background: white;
  border-radius: 24px;
  padding: 25px;
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
}

.summary-card.sticky {
  position: sticky;
  top: 100px;
}

.summary-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.summary-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 5px;
}

.summary-items::-webkit-scrollbar {
  width: 4px;
}

.summary-items::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

.summary-items::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.summary-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-item-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.summary-item-details {
  flex: 1;
  min-width: 0;
}

.summary-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.summary-item-quantity {
  color: var(--text-soft);
}

.summary-item-price {
  font-weight: 600;
  color: var(--accent);
}

.summary-divider {
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.summary-row.total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--border-light);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.summary-value {
  font-weight: 500;
  color: var(--text-dark);
}

.summary-value.total-amount {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
}

/* Secure Badge */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e3f2e9;
  border-radius: 40px;
  padding: 10px 15px;
  margin: 20px 0;
  color: #2f6e4a;
  font-size: 0.85rem;
}

.secure-badge i {
  font-size: 1rem;
}

/* Accepted Payments */
.accepted-payments {
  display: flex;
  justify-content: center;
  gap: 15px;
  color: #94a3b8;
  font-size: 1.8rem;
}

/* Mobile Order Summary */
.mobile-order-summary {
  display: none;
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .mobile-order-summary {
    display: block;
  }
}

.mobile-order-summary h3 {
  font-size: 1rem;
  margin: 0 0 15px 0;
  color: var(--text-dark);
}

.mobile-order-summary .summary-total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

/* Payment Section */
.payment-element-container {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid var(--border-light);
  min-height: 200px;
}

.payment-element-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(183, 140, 90, 0.1);
}

/* Test Card Section */
.test-card-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px dashed var(--border-light);
}

.test-card-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  border: 1px solid var(--border-light);
}

.test-card-content {
  flex: 1;
}

.test-card-content .label {
  font-size: 0.7rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.test-card-content .card-number {
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.test-card-content .card-hint {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.test-card-content .card-hint i {
  color: var(--accent);
  margin-right: 4px;
}

/* Payment Message */
.payment-message {
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
}

.payment-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.payment-message.success {
  background: #e3f2e9;
  color: #2f6e4a;
  border: 1px solid #c8e6d9;
}

.payment-message i {
  font-size: 1.1rem;
}

/* Payment Actions */
.payment-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.payment-actions button {
  flex: 1;
}

@media (max-width: 480px) {
  .payment-actions {
    flex-direction: column;
  }
}

/* Success Modal */
.success-icon {
  width: 60px;
  height: 60px;
  background: #e3f2e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon i {
  font-size: 2.5rem;
  color: #2f6e4a;
}

/* Loading State */
.checkout-loading {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 30px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

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

/* Error State */
.checkout-error {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 30px;
}

.checkout-error i {
  font-size: 3rem;
  color: #ef4444;
  margin-bottom: 15px;
}

.checkout-error h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.checkout-error p {
  color: var(--text-soft);
  margin-bottom: 20px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
}

.toast-notification {
  padding: 12px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid;
}

.toast-notification.success {
  border-left-color: #10b981;
}

.toast-notification.error {
  border-left-color: #ef4444;
}

.toast-notification.info {
  border-left-color: var(--accent);
}

.toast-notification i {
  font-size: 1.1rem;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================================================
   MODAL STYLES - Fix for hidden by default
   ======================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Change from flex to none */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex; /* Show when active class is added */
}

/* Success Modal Styles */
.success-icon {
  width: 60px;
  height: 60px;
  background: #e3f2e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon i {
  font-size: 2.5rem;
  color: #2f6e4a;
}
/* ========================================================================
   COUNTRY/CITY DROPDOWN STYLES
   ======================================================================== */

/* Style for select dropdowns */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
  background-color: white;
}

select.form-control:hover {
  border-color: var(--accent-light);
}

select.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 140, 90, 0.1);
}

select.form-control:disabled {
  background-color: var(--bg);
  opacity: 0.6;
  cursor: not-allowed;
}

/* REMOVED: Currency info styles */

/* Animation for dropdown focus */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(183, 140, 90, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(183, 140, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(183, 140, 90, 0);
  }
}

.pulse-animation {
  animation: pulse 0.5s ease;
}
