/* ShopPay — Shopier Siteden Çıkmadan Ödeme Modal Stilleri */
:root {
  --shoppay-primary: #ff5000;
  --shoppay-dark: #1e293b;
  --shoppay-border: #e2e8f0;
}

#shoppay-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

#shoppay-modal-overlay.shoppay-visible {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

#shoppay-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  height: 86vh;
  max-height: 820px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease-out;
}

#shoppay-modal-overlay.shoppay-visible #shoppay-modal-container {
  transform: scale(1);
}

#shoppay-modal-header {
  height: 54px;
  background: #ffffff;
  border-bottom: 1px solid var(--shoppay-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.shoppay-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--shoppay-dark);
}

.shoppay-ssl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #059669;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

#shoppay-modal-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background-color 0.15s, color 0.15s;
}

#shoppay-modal-close:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

#shoppay-modal-body {
  flex: 1;
  position: relative;
  background: #fafafa;
}

#shoppay-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

#shoppay-modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  gap: 12px;
  z-index: 2;
  transition: opacity 0.3s ease;
}

#shoppay-modal-loader.shoppay-hidden {
  opacity: 0;
  pointer-events: none;
}

.shoppay-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--shoppay-primary);
  border-radius: 50%;
  animation: shoppay-spin 0.8s linear infinite;
}

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

.shoppay-loader-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* Başarı ekranı */
#shoppay-modal-success {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 10;
}

.shoppay-checkmark-icon {
  width: 64px;
  height: 64px;
  background: #ecfdf5;
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.shoppay-success-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.shoppay-success-sub {
  font-size: 13px;
  color: #64748b;
}

/* Popup Prompt Ekranı */
#shoppay-popup-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  background: #ffffff;
  height: 100%;
  box-sizing: border-box;
}

.shoppay-prompt-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.shoppay-prompt-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.shoppay-prompt-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 24px 0;
  max-width: 380px;
}

.shoppay-prompt-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 24px;
}

.shoppay-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5000;
  box-shadow: 0 0 0 0 rgba(255, 80, 0, 0.7);
  animation: shoppay-pulse 1.5s infinite;
}

@keyframes shoppay-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 80, 0, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 80, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 80, 0, 0); }
}

.shoppay-prompt-actions {
  margin-bottom: 16px;
}

.shoppay-btn-primary {
  background: #ff5000;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(255, 80, 0, 0.25);
}

.shoppay-btn-primary:hover {
  background: #ea4800;
  transform: translateY(-1px);
}

.shoppay-prompt-note {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
}

/* Mobil tam ekran / bottom-sheet görünümü */
@media (max-width: 640px) {
  #shoppay-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  #shoppay-modal-container {
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateY(20px);
  }
  #shoppay-modal-overlay.shoppay-visible #shoppay-modal-container {
    transform: translateY(0);
  }
  #shoppay-modal-header {
    height: 52px;
    padding: 0 14px;
  }
}

/* ─────────────────────────────────────────────────────────────
   MODEL 1: SAYFA İÇİ GÖMÜLÜ (INLINE CHECKOUT EMBED)
   ───────────────────────────────────────────────────────────── */
#shoppay-inline-container {
  width: 100%;
  max-width: 760px;
  margin: 20px auto 40px auto;
  background: #ffffff;
  border: 1px solid var(--shoppay-border);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

#shoppay-inline-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--shoppay-border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.shoppay-inline-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--shoppay-dark);
}

.shoppay-inline-back-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shoppay-inline-back-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

#shoppay-inline-body {
  position: relative;
  min-height: 720px;
  height: 78vh;
  max-height: 860px;
  background: #ffffff;
}

#shoppay-inline-iframe {
  width: 100%;
  height: 100%;
  min-height: 720px;
  border: none;
  display: block;
  background: #ffffff;
}

#shoppay-inline-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
}

#shoppay-inline-success {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  z-index: 30;
}

@media (max-width: 640px) {
  #shoppay-inline-container {
    margin: 10px 0 20px 0;
    border-radius: 12px;
  }
  #shoppay-inline-body {
    min-height: 640px;
    height: 82vh;
  }
  #shoppay-inline-iframe {
    min-height: 640px;
  }
}
