.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-top: 2rem;
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #333;
}

.billing-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.billing-form > input,
.billing-form > select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  text-align: left;
  box-sizing: border-box;
}

.billing-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

::placeholder {
  text-align: left;
  color: #999;
}

/* Form row for expiry and CVV to be on same line */
.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.form-field {
  flex: 1;
}

.form-field input {
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.billing-form button[type='submit'] {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
}

.billing-form button[type='submit']:hover:not(:disabled) {
  background-color: #0056b3;
}

.billing-form button[type='submit']:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.error {
  color: #f44336;
  padding: 0.75rem;
  background-color: #ffebee;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.success {
  color: #4caf50;
  padding: 0.75rem;
  background-color: #e8f5e9;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.cart-billing-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center;
}

.modal-content .main-fields > input,
.modal-content .main-fields > select {
  width: 90%;
  text-align: left;
  margin-bottom: 1rem;
}

.main-fields .form-row {
  display: flex;
  gap: 1rem;
  width: 90%;
  justify-content: flex-start;
  align-items: stretch;
}

.main-fields .form-row .form-field {
  flex: 1;
}

.main-fields .form-row .form-field input {
  width: 100%;
  text-align: left;
}

/* Confirmation modal backdrop */
.confirm-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
}

/* Confirmation modal content */
.confirm-modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.confirm-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

/* Buttons */
.confirm-modal-buttons button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.confirm-modal-buttons button.confirm {
  background-color: #007bff;
  color: white;
}

.confirm-modal-buttons button.confirm:hover {
  background-color: #0056b3;
}

.confirm-modal-buttons button.cancel {
  background-color: #f44336;
}

.confirm-modal-buttons button.cancel:hover {
  background-color: #d32f2f;
}
