/* ── DeepCast Report Panel ─────────────────────────────
   Standalone report viewer styles.
   Include this CSS on any page that embeds a DeepCastReport.
   ────────────────────────────────────────────────────── */

/* Panel shell */
.dc-report-panel {
  position: fixed; top: 64px; right: 0; bottom: 0; width: 560px;
  background: rgba(15, 32, 65, 0.97); color: #e0e0e0;
  z-index: 10001; transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.4);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dc-report-panel.active { transform: translateX(0); }

/* Header */
.dc-report-panel-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: flex-start; gap: 12px; flex-shrink: 0;
}
.dc-report-panel-header-info { flex: 1; min-width: 0; }
.dc-report-panel-header h3 {
  font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 2px;
}
.dc-report-panel-header .dc-report-panel-sub {
  font-size: 12px; color: rgba(255,255,255,0.5); margin: 0;
}
.dc-report-panel-meta {
  font-size: 11px; color: rgba(255,255,255,0.35); margin: 2px 0 0;
}

/* PDF download */
.dc-report-pdf-dl {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08);
  text-decoration: none; cursor: pointer; transition: background 0.15s;
}
.dc-report-pdf-dl:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Feedback buttons */
.dc-report-feedback { display: flex; gap: 4px; flex-shrink: 0; }
.dc-feedback-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
  color: rgba(255,255,255,0.3); cursor: pointer; padding: 4px 6px;
  transition: all 0.15s; display: flex; align-items: center;
}
.dc-feedback-btn:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }
.dc-feedback-btn.active-up { color: #66bb6a; border-color: #66bb6a; background: rgba(102,187,106,0.15); }
.dc-feedback-btn.active-down { color: #ef5350; border-color: #ef5350; background: rgba(239,83,80,0.15); }

/* Share button */
.dc-report-share-btn {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08);
  border: none; cursor: pointer; transition: background 0.15s;
}
.dc-report-share-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.dc-report-share-btn:disabled { opacity: 0.5; cursor: default; }

/* Share menu */
.dc-share-menu {
  display: none; position: absolute; z-index: 20;
  background: #1e1e32; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 4px 0; min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.dc-share-menu.active { display: block; }
.dc-share-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; border: none; background: none;
  color: rgba(255,255,255,0.85); font-size: 13px; cursor: pointer;
  text-align: left; white-space: nowrap;
}
.dc-share-menu-item:hover { background: rgba(255,255,255,0.1); }
.dc-share-menu-item svg { flex-shrink: 0; }

/* Report toast */
.dc-report-toast {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(8px);
  z-index: 10; padding: 10px 20px;
  background: rgba(30, 30, 50, 0.95); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px; color: #fff;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap; opacity: 0;
  transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.dc-report-toast.active { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Close button */
.dc-report-panel-close {
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 22px; cursor: pointer; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.dc-report-panel-close:hover { color: #fff; }

/* Loading state */
.dc-report-panel-loading {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 10px; color: rgba(255,255,255,0.5); font-size: 14px;
}
.dc-report-panel-loading .dc-spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #4fc3f7;
}

/* Body & error */
.dc-report-panel-body {
  flex: 1; overflow-y: auto; padding: 0; display: flex; flex-direction: column;
}
.dc-report-panel-error {
  padding: 20px; color: #ef5350; text-align: center;
}

/* Tab bar */
.dc-report-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0; background: rgba(15, 32, 65, 0.97);
  position: sticky; top: 0; z-index: 1;
}
.dc-report-tab {
  flex: 1; padding: 10px 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  color: rgba(255,255,255,0.4); text-align: center;
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.dc-report-tab:hover { color: rgba(255,255,255,0.7); }
.dc-report-tab.active {
  color: #FF8504; border-bottom-color: #FF8504;
}
.dc-report-tab-content {
  display: none; flex: 1;
}
.dc-report-tab-content.active {
  display: block;
}

/* Zone sections */
.dc-report-zone {
  padding: 20px;
}
.dc-report-zone h4 {
  font-size: 13px; font-weight: 700; color: #4fc3f7;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 10px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.15s;
}
.dc-report-zone h4:hover { color: #81d4fa; }
.dc-report-zone h4.active { color: #FF8504; }
.dc-zone-eye-toggle {
  cursor: pointer; opacity: 0.5;
  transition: opacity 0.15s; padding: 2px 4px; line-height: 0;
}
.dc-zone-eye-toggle:hover { opacity: 0.8; }
.dc-zone-eye-toggle.active { opacity: 1; }
.dc-zone-eye-toggle svg { vertical-align: middle; }
.dc-report-zone-subtitle {
  font-size: 12px; color: rgba(255,255,255,0.5); margin: -8px 0 8px;
  font-style: italic;
}
.dc-zone-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: rgba(255,255,255,0.4);
  margin: 14px 0 6px;
}
.dc-zone-section-label:first-of-type { margin-top: 0; }
.dc-zone-summary {
  font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.85);
  padding: 12px 16px; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); border-radius: 8px;
  border-left: 3px solid rgba(79,195,247,0.4);
}
.dc-zone-summary strong { color: #fff; }
.dc-report-zone-body {
  font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.85);
}
.dc-report-zone-body p { margin: 0 0 10px; }
.dc-report-zone-body p:last-child { margin-bottom: 0; }
.dc-report-zone-body strong, .dc-report-zone-body b { color: #fff; }
.dc-spot-link {
  color: #4fc3f7; cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted; text-underline-offset: 2px;
}
.dc-spot-link:hover { color: #81d4fa; }

/* Spot popups (Leaflet) */
.dc-spot-popup .leaflet-popup-content-wrapper {
  background: rgba(20, 30, 55, 0.95); color: #e0e0e0;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.dc-spot-popup .leaflet-popup-tip { background: rgba(20, 30, 55, 0.95); }
.dc-spot-popup .leaflet-popup-close-button { color: rgba(255,255,255,0.5); }
.dc-spot-popup .leaflet-popup-close-button:hover { color: #fff; }

/* Annotations / Key Spots */
.dc-report-annotations {
  padding: 20px;
}
.dc-report-annotations h4 {
  font-size: 13px; font-weight: 700; color: #4fc3f7;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 10px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.15s;
}
.dc-report-annotations h4:hover { color: #81d4fa; }
.dc-report-spot {
  background: rgba(255,255,255,0.04); border-radius: 6px;
  padding: 10px 12px; margin-bottom: 8px;
}
.dc-report-spot-name {
  font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 2px;
}
.dc-report-spot-meta {
  font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 4px;
}
.dc-report-spot-desc {
  font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5;
}
.dc-report-spot.dc-spot-highlight {
  background: rgba(255,133,4,0.12); border: 1px solid rgba(255,133,4,0.3);
}
.dc-report-spot.dc-spot-dim {
  opacity: 0.3;
}

/* Top Spots ranked list */
.dc-top-spots {
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dc-top-spots h4 {
  font-size: 13px; font-weight: 700; color: #FF8504;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 10px;
}
.dc-top-spot {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255,133,4,0.06); border-radius: 6px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  transition: background 0.15s;
}
.dc-top-spot:hover { background: rgba(255,133,4,0.12); }
.dc-top-spot-rank {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #daa520, #b8860b);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dc-top-spot-body { flex: 1; min-width: 0; }
.dc-top-spot-label {
  font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 2px;
}
.dc-top-spot-rationale {
  font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5;
}
/* Key spots expandable section */
.dc-keyspots-toggle {
  padding: 12px 0; text-align: center; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #4fc3f7;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px; transition: color 0.15s;
}
.dc-keyspots-toggle:hover { color: #81d4fa; }
.dc-keyspots-expanded {
  display: none; border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 8px;
}
.dc-keyspots-expanded.active { display: block; }
@keyframes dc-spot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,133,4,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,133,4,0); }
}
.dc-annotation-highlight {
  animation: dc-spot-pulse 1.5s ease infinite;
}
.dc-departure-marker {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

/* Drag handle — hidden on desktop */
.dc-report-drag-handle {
  display: none;
}

/* Sample report badge + watermark */
.dc-report-sample-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: #e040fb;
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
}
.dc-report-sample::after {
  content: 'SAMPLE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 72px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 12px;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Feature legend */
.dc-feature-legend {
  padding: 16px 20px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.dc-feature-legend h4 {
  font-size: 13px; font-weight: 700; color: #4fc3f7;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 8px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.dc-feature-legend-item {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; cursor: pointer;
  transition: opacity 0.15s;
}
.dc-feature-legend-item:hover { opacity: 0.8; }
.dc-feature-swatch {
  flex-shrink: 0; border-radius: 2px;
}
.dc-feature-swatch-line {
  width: 20px; height: 3px;
}
.dc-feature-swatch-point {
  width: 10px; height: 10px; border-radius: 50%;
}
.dc-feature-legend-label {
  flex: 1; font-size: 12px; color: rgba(255,255,255,0.8);
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .dc-report-panel {
    width: 100%; top: auto; right: 0; left: 0; bottom: 0;
    height: 55vh;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  }
  .dc-report-panel.active { transform: translateY(0); }
  .dc-report-panel.dc-sheet-dragging { transition: none; }
  .dc-report-drag-handle {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 0 4px; cursor: grab; flex-shrink: 0;
  }
  .dc-report-drag-handle span {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.3);
  }
  .dc-report-panel-header { padding: 8px 16px; }
  .dc-report-panel-header h3 { font-size: 14px; }
  .dc-report-feedback { gap: 2px; }
  .dc-feedback-btn { padding: 2px 4px; border: none; border-radius: 4px; }
  .dc-feedback-btn svg { width: 14px; height: 14px; }
  .dc-report-pdf-dl { padding: 3px 6px; }
  .dc-report-pdf-dl svg { width: 14px; height: 14px; }
  .dc-report-share-btn { padding: 3px 6px; }
  .dc-report-share-btn svg { width: 14px; height: 14px; }
  .dc-report-toast { font-size: 13px; padding: 8px 16px; max-width: 85vw; }
  .dc-report-panel-close { font-size: 18px; }
  .dc-report-sample::after {
    font-size: 48px;
    letter-spacing: 8px;
  }
}
