/**
 * Unseen Place — Map Export & Custom Map Builder Stylesheet (Step 4)
 *
 * @package Unseen_Place
 * @since 4.0.0
 */

/* ==========================================================================
   1. EXPORT DOWNLOAD BUTTONS TOOLBAR
   ========================================================================== */

.up-map-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 16px;
  gap: 12px;
  position: relative;
  z-index: 20;
}

.up-export-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.up-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.2;
}

.up-export-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

.up-export-btn-primary {
  background: #064e3b;
  border-color: #064e3b;
  color: #ffffff;
}

.up-export-btn-primary:hover {
  background: #022c22;
  border-color: #022c22;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
}

.up-export-btn-accent {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
}

.up-export-btn-accent:hover {
  background: #075985;
  border-color: #075985;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.2);
}

.up-export-mobile-toggle {
  display: none;
}

@media (max-width: 768px) {
  .up-export-buttons-group {
    display: none;
  }
  .up-export-mobile-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   2. EXPORT MODAL DIALOG
   ========================================================================== */

.up-export-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.up-export-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.up-export-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 1100px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.up-export-modal-backdrop.is-active .up-export-modal {
  transform: scale(1);
}

.up-export-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.up-export-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.up-export-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.up-export-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.up-export-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ==========================================================================
   3. CUSTOM MAP BUILDER 3-COLUMN WORKSPACE
   ========================================================================== */

.up-builder-grid {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 20px;
  height: 600px;
}

@media (max-width: 1024px) {
  .up-builder-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.up-builder-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.up-builder-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #064e3b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.up-builder-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.up-builder-label {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.up-builder-input,
.up-builder-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.up-builder-input:focus,
.up-builder-select:focus {
  border-color: #064e3b;
  box-shadow: 0 0 0 2px rgba(6, 78, 59, 0.15);
}

.up-builder-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.up-builder-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.up-builder-checkbox-item:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   4. CANVAS LIVE PREVIEW WORKSPACE
   ========================================================================== */

.up-preview-stage {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-radius: 14px;
  border: 1px solid #1e293b;
  overflow: hidden;
  position: relative;
}

.up-preview-stage-header {
  padding: 8px 14px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.up-preview-stage-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background: #020617;
}

.up-preview-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  background: #ffffff;
}

/* ==========================================================================
   5. PROGRESS BAR & STATUS FEEDBACK
   ========================================================================== */

.up-export-progress {
  padding: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #065f46;
  font-weight: 600;
}

.up-export-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #065f46;
  border-top-color: transparent;
  border-radius: 50%;
  animation: up-spin 0.8s linear infinite;
}

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