/* Custom styles for COD confirmation modal */
.popup_codConfirmation {
  position: fixed;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999999;
  overflow-y: scroll;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
}

.popup_codConfirmation.show {
  opacity: 1;
  visibility: visible;
}

.popup_container {
  width: 90%;
  max-width: 450px;
  background: #fff;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup_content {
  padding: 12px;
  text-align: center;
}

.popup_content h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  color: #333;
  font-weight: 600;
}

.popup_content p {
  margin: 0 0 25px 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: 0px;
  color: #40484f;
  line-height: 1.5;
}

.popup_footer {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 16px;
}

.popup_footer .button {
  flex: 1;
  padding: 8px 12px;
  font-family: 'Work Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: 0px;
  max-width: 100% !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.popup_footer .button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.popup_footer .button:not(.button-primary) {
  background: #ffffff;
  color: #40484f;
  border: 1px solid #8f9aa3;
}

.popup_footer .button:not(.button-primary):hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.popup_footer .button-primary {
  background: #007cba;
  color: white;
  border-color: #007cba;
}

.popup_footer .button-primary:hover {
  background: #005a87;
  border-color: #005a87;
}

/* Legacy styles for backwards compatibility */
#codConfirmation {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

#codConfirmation.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cod-confirmation-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.cod-confirmation-buttons {
  margin-top: 20px;
}

.cod-confirmation-buttons button {
  margin: 0 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#confirmCod {
  background-color: #28a745;
  color: white;
}

#cancelCod {
  background-color: #dc3545;
  color: white;
}

#confirmCod:hover {
  background-color: #218838;
}

#cancelCod:hover {
  background-color: #c82333;
}

.cod-eligibility-message {
  color: #dc3545;
  font-weight: bold;
  margin-top: 5px;
}

/* Responsive design for modal */
@media screen and (max-width: 480px) {
  .popup_container {
    width: 95%;
    margin: 20px auto;
  }

  .popup_content {
    padding: 12px;
  }

  .popup_content h3 {
    font-size: 18px;
  }

  .popup_content p {
    font-size: 14px;
  }

  .popup_footer {
    flex-direction: column;
    gap: 10px;
  }

  .popup_footer .button {
    max-width: 100% !important;
    padding: 15px 20px;
    font-size: 16px;
  }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
  .popup_container {
    width: 80%;
  }

  .popup_footer .button {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* Animation improvements */
.popup_codConfirmation {
  transition: all 0.3s ease-in-out;
}

.popup_container {
  transition: transform 0.3s ease-in-out;
  transform: translate(-50%, -60%);
}

.popup_codConfirmation.show .popup_container {
  transform: translate(-50%, -50%);
}

/* Payment method loading states */
.payment_methods.loading {
  opacity: 0.6;
  pointer-events: none;
}

.payment_methods li input[type='radio']:disabled {
  opacity: 0.5;
}

.payment_methods li.payment_method_cod.updating {
  position: relative;
}

.payment_methods li.payment_method_cod.updating::after {
  content: 'Calculating fees...';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #0073aa;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
