/* ── Drop zone ────────────────────────────────────────────── */
.drop-zone-active {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border-color: #10b981 !important;
}

@keyframes borderPulse {
  0%, 100% { border-color: #10b981; }
  50%       { border-color: #3b82f6; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.4); }
  50%      { box-shadow: 0 0 8px 2px rgba(16, 185, 129, 0.6); border-color: rgba(16, 185, 129, 0.8); }
}

.border-animate {
  animation: borderPulse 2s ease-in-out infinite;
}

/* ── Skill bars ───────────────────────────────────────────── */
.skill-bar {
  position: relative;
  overflow: visible;
  border-radius: 9999px;
  background-color: #1e293b;
  height: 6px;
  width: 100%;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 1s ease-out;
}

/* ── Skeleton loaders ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Bento grid ───────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  position: relative; /* needed for #export-watermark positioning */
}

/* Mobile: all full width */
.bento-hero,
.bento-radar,
.bento-dim,
.bento-dim-bottom,
.bento-salary,
.bento-skills,
.bento-gap {
  grid-column: span 12;
}

@media (min-width: 1024px) {
  /* Row 1: Hero full width */
  .bento-hero { grid-column: span 12; }

  /* Row 2–3: Radar (6 cols, 2 rows) + 4 dim cards (3 cols each) */
  .bento-radar { grid-column: span 6; grid-row: span 2; }
  .bento-dim   { grid-column: span 3; }

  /* Row 4: Salary (4) + dim5 (4) + dim6 (4) */
  .bento-salary    { grid-column: span 4; }
  .bento-dim-bottom { grid-column: span 4; }

  /* Row 5: Skills (7) + Gap (5) */
  .bento-skills { grid-column: span 7; }
  .bento-gap    { grid-column: span 5; }
}

/* ── Bento card base ──────────────────────────────────────── */
.bento-card {
  min-height: 120px;
}

/* ── Dimension cards ──────────────────────────────────────── */
.dim-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.dim-card-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.dim-score-bar {
  position: relative;
  height: 4px;
  border-radius: 9999px;
  background: #1e293b;
  overflow: hidden;
  margin-top: 0.5rem;
}

.dim-score-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 9999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dim-score-bar-avg {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 8px;
  background: #64748b;
  border-radius: 1px;
}

/* ── Radar chart container ────────────────────────────────── */
.radar-container {
  position: relative;
  height: 280px;
  width: 100%;
}

@media (min-width: 1024px) {
  .radar-container {
    height: 360px;
  }
}

/* ── Custom radar tooltip ─────────────────────────────────── */
.radar-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  max-width: 220px;
  pointer-events: none;
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: opacity 0.15s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.radar-tooltip.hidden { opacity: 0; display: none; }

.radar-tooltip-label {
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.radar-tooltip-scores {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

.radar-tooltip-score {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.radar-tooltip-avg {
  font-size: 11px;
  color: #64748b;
}

.radar-tooltip-just {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

/* ── Gap analysis cards ───────────────────────────────────── */
.gap-card-high   { border-left: 3px solid #ef4444; }
.gap-card-medium { border-left: 3px solid #eab308; }
.gap-card-low    { border-left: 3px solid #64748b; }

/* ── Header benchmark badge glow ─────────────────────────── */
#header-seniority {
  color: var(--theme-color, #10b981);
  text-shadow: 0 0 8px color-mix(in srgb, var(--theme-color, #10b981) 55%, transparent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Bento gap glow (Sube de nivel) ──────────────────────── */
.bento-gap {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15), 0 0 28px rgba(16, 185, 129, 0.07);
  transition: box-shadow 0.3s ease;
}
.bento-gap:hover {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.28), 0 0 40px rgba(16, 185, 129, 0.13);
}

/* ── Gap priority badge as button ────────────────────────── */
.gap-priority-btn {
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.gap-priority-btn:hover {
  opacity: 0.8;
  transform: scale(1.04);
}

/* ── Skill bar market average marker ─────────────────────── */
.skill-bar-avg {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 10px;
  background: #64748b;
  border-radius: 1px;
  opacity: 0.8;
}

/* ── Skills filter tabs ───────────────────────────────────── */
.skill-filter-tab {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid #334155;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.skill-filter-tab:hover {
  border-color: #475569;
  color: #94a3b8;
}
.skill-filter-tab.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

/* ── Skills radar mini-chart ─────────────────────────────── */
.skills-radar-container {
  position: relative;
  height: 180px;
  width: 100%;
  margin-top: 1rem;
}

/* ── Soft skills clickable badge ─────────────────────────── */
.soft-skill-btn {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.soft-skill-btn:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.18), inset 0 0 12px rgba(16, 185, 129, 0.05);
  transform: translateY(-1px);
  color: #e2e8f0;
}
.soft-skill-btn:active {
  transform: translateY(0);
}

/* ── Download / Recommend modal variants ─────────────────── */
.modal-action-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}
.modal-action-btn:active { transform: scale(0.97); }
.modal-action-btn-primary {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}
.modal-action-btn-primary:hover { background: rgba(16, 185, 129, 0.22); }
.modal-action-btn-secondary {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}
.modal-action-btn-secondary:hover { background: #263045; }

/* ── Social share buttons in recommend modal ─────────────── */
.social-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}
.social-share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.social-share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Coffee CTA in download modal ────────────────────────── */
.coffee-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.coffee-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #ca8a04;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.coffee-cta-link:hover { background: rgba(234, 179, 8, 0.17); }

/* ── Scrollbar (skills list) ──────────────────────────────── */
.skills-scroll {
  overflow-y: auto;
  max-height: 420px;
}

.skills-scroll::-webkit-scrollbar { width: 4px; }
.skills-scroll::-webkit-scrollbar-track { background: #0f172a; }
.skills-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 9999px; }
.skills-scroll::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Loading scanner animation ────────────────────────────── */
@keyframes scanDown {
  0%, 100% { top: 10%; opacity: 1; }
  50%       { top: 80%; opacity: 0.6; }
}

.scanner-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  animation: scanDown 2s ease-in-out infinite;
}

/* ── Export overlays (revealed by client-side export) ────────── */

/* QR overlay: hidden by default, shown programmatically during export */
.export-overlay-hidden {
  display: none;
  pointer-events: none;
}

/* QR code anchored to bottom-right of the bento grid during export */
#qr-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  z-index: 9999;
}

/* Diagonal watermark across the bento grid */
/* ── Brand identity font ─────────────────────────────────── */
.brand-orbitron {
  font-family: 'Orbitron', sans-serif;
}

#export-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f8fafc;
  opacity: 0.04;
  pointer-events: none;
  transform: rotate(-35deg);
  white-space: nowrap;
  z-index: 0;
  user-select: none;
}

/* ── Misc ─────────────────────────────────────────────────── */
.pill-category {
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Dimension cards: position context for info button ────── */
.bento-dim,
.bento-dim-bottom {
  position: relative;
}

/* ── Metric info button (i) ───────────────────────────────── */
.metric-info-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1;
  user-select: none;
  z-index: 1;
  transition: all 0.2s ease;
  animation: pulse-glow 3s infinite ease-in-out;
}

.metric-info-btn:hover,
.metric-info-btn:focus-visible {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  animation-play-state: paused;
  outline: none;
}

/* ── Metric info modal backdrop ───────────────────────────── */
.metric-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.metric-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ── Metric info modal card ───────────────────────────────── */
.metric-modal {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.65);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.metric-modal-backdrop.open .metric-modal {
  transform: scale(1) translateY(0);
}

.metric-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.metric-modal-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-modal-icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.metric-modal-meta {
  flex: 1;
  min-width: 0;
}

.metric-modal-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #475569;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.metric-modal-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.5);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.metric-modal-close:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #94a3b8;
}

.metric-modal-close svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.metric-modal-section {
  margin-bottom: 1rem;
}

.metric-modal-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #10b981;
  margin-bottom: 0.375rem;
}

.metric-modal-body {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.65;
}

.metric-modal-benchmark {
  font-size: 0.6875rem;
  color: #475569;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Print Styles ─────────────────────────────────────────── */
@media print {
  @page {
    margin: 5mm;
  }
  
  /* Hide non-report UI elements */
  header,
  footer,
  #sticky-action-bar,
  #cookie-banner,
  .metric-info-btn,
  #turnstile-dashboard-wrap {
    display: none !important;
  }

  body {
    background: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Optimize bento grid for print */
  .bento-grid {
    gap: 0.5rem !important;
  }

  .bento-card {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Ensure Hero takes full width and looks crisp */
  .bento-hero {
    border-radius: 12px !important;
  }
}
