/* ==========================================================================
   LOADOUT IMAGE EXPORT MODAL & SHARING SYSTEM
   ========================================================================== */

/* Topbar Export Trigger Button */
.export-loadout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.25) 0%, rgba(255, 70, 85, 0.1) 100%);
  border: 1px solid rgba(255, 70, 85, 0.5);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(255, 70, 85, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.export-loadout-btn:hover {
  background: var(--accent);
  border-color: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 70, 85, 0.45);
}

.export-loadout-btn svg {
  width: 14px;
  height: 14px;
}

/* Export Modal Overlay */
.export-modal {
  position: fixed;
  inset: 0;
  z-index: 110000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.export-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.export-modal-panel {
  position: relative;
  width: min(1280px, 100%);
  max-height: 92vh;
  background: linear-gradient(135deg, rgba(8, 23, 35, 0.98) 0%, rgba(5, 16, 25, 0.99) 100%);
  border: 1px solid rgba(98, 230, 239, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 30px rgba(98, 230, 239, 0.1);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  animation: hudPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(180, 209, 220, 0.15);
  padding-bottom: 16px;
}

.export-modal-header h2 {
  margin: 4px 0 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}

/* Canvas Preview Container */
.export-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 15, 24, 0.8);
  border: 1px solid rgba(180, 209, 220, 0.2);
  border-radius: 4px;
  padding: 16px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
  min-height: 280px;
  position: relative;
}

#exportPreviewCanvas {
  max-width: 100%;
  max-height: 680px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2);
  display: block;
}

.export-canvas-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* Export Actions */
.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(180, 209, 220, 0.15);
}

.export-hints {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.export-buttons {
  display: flex;
  gap: 12px;
}

.btn-copy-image {
  background: rgba(14, 58, 81, 0.6);
  border: 1px solid rgba(98, 230, 239, 0.4);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-copy-image:hover {
  background: rgba(14, 58, 81, 0.9);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(98, 230, 239, 0.3);
  transform: translateY(-1px);
}

.btn-download-image {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 22px;
  cursor: pointer;
  border-radius: 2px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(255, 70, 85, 0.35);
}

.btn-download-image:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 70, 85, 0.5);
}

.export-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(8, 23, 35, 0.96);
  border: 1px solid var(--cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(98, 230, 239, 0.3);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  border-radius: 3px;
  z-index: 120000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
