/* Export System Styles - Modern SaaS */

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  min-width: 280px;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease;
}

html.dark .toast {
  background: #1e293b;
  border-color: #334155;
}

.toast.success {
  border-left: 3px solid #16a34a;
}

.toast.error {
  border-left: 3px solid #dc2626;
}

.toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #16a34a;
}

.toast.error .toast-icon {
  color: #dc2626;
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
}

html.dark .toast-message {
  color: #f1f5f9;
}

.toast-close {
  padding: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  transition: color 0.15s;
}

.toast-close:hover {
  color: #0f172a;
}

html.dark .toast-close:hover {
  color: #f1f5f9;
}

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

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

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

/* Export Menu Dropdown */
.export-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  min-width: 180px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0.25rem;
  z-index: 50;
}

html.dark .export-menu {
  background: #1e293b;
  border-color: #334155;
}

.export-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

html.dark .export-item {
  color: #f1f5f9;
}

.export-item:hover {
  background: #f1f5f9;
}

html.dark .export-item:hover {
  background: #334155;
}

.export-item svg {
  flex-shrink: 0;
  color: #64748b;
}

.export-item:hover svg {
  color: #2563eb;
}

/* Export Canvas — PNG için tam sayfa kartı (ekran dışında) */
.export-canvas {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 920px;
  max-width: 920px;
  padding: 0;
  background: white;
  border-radius: 0.75rem;
  font-family: 'Inter', system-ui, sans-serif;
  box-sizing: border-box;
  overflow: visible;
}

html.dark .export-canvas {
  background: #0f172a;
  color: #f1f5f9;
}

.export-sheet {
  padding: 1.75rem 1.75rem 1.25rem;
  box-sizing: border-box;
}

.export-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

html.dark .export-header {
  border-bottom-color: #334155;
}

.export-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.export-rule-box {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}

html.dark .export-rule-box {
  border-color: #334155;
  background: #1e293b;
}

/* Adım kartları (sayfadaki HTML ile uyumlu) */
.export-canvas .export-steps .step-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.375rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}

html.dark .export-canvas .export-steps .step-card {
  border-color: #334155;
  background: #1e293b;
}

.export-canvas .export-steps .step-num {
  flex-shrink: 0;
}

.export-canvas .export-steps .step-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  flex: 1;
}

.export-token-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.export-rail {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  overflow-x: auto;
}

html.dark .export-rail {
  border-color: #334155;
  background: #0f1729;
}

.export-rail svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Alt şerit: metin solda, logo sağ altta */
.export-sheet-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

html.dark .export-sheet-footer {
  border-top-color: #334155;
}

.export-footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.export-footer-brand {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

html.dark .export-footer-brand {
  color: #94a3b8;
}

.export-footer-meta {
  font-size: 0.6875rem;
  color: #94a3b8;
}

.export-sheet-logo {
  display: block;
  max-height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
}

.export-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

html.dark .export-title {
  color: #f1f5f9;
}

.export-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.export-section {
  margin-bottom: 1.5rem;
}

.export-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.export-regex {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: #2563eb;
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  word-break: break-all;
}

html.dark .export-regex {
  background: #1e293b;
  border-color: #334155;
  color: #60a5fa;
}

.export-explanation {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
}

html.dark .export-explanation {
  color: #cbd5e1;
}

/* Loading Spinner */
.export-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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