/* Khaime Checkout Modal */

body.khaime-checkout-open {
  overflow: hidden;
}

.khaime-checkout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.khaime-checkout-overlay.khaime-visible {
  opacity: 1;
}

.khaime-checkout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 500px;
  height: 85vh;
  max-height: 700px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.khaime-checkout-modal.khaime-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.khaime-checkout-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.khaime-checkout-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.khaime-checkout-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Loading Spinner */
.khaime-checkout-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
}

.khaime-checkout-spinner p {
  margin-top: 16px;
  color: #666;
  font-size: 14px;
}

.khaime-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid #e0e0e0;
  border-top-color: #42c3ff;
  border-radius: 50%;
  animation: khaime-spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
  .khaime-checkout-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .khaime-checkout-modal.khaime-visible {
    transform: translateY(0);
  }
}
