/* Salary Comparison — Dynamic Result Elements
   Applied via JS innerHTML, so must be global (non-scoped)
   All selectors: NO Astro scoped attributes — these elements are created at runtime
*/

/* ── RESULTS WRAPPER ── */
.sc-results {
  max-width: 760px;
  margin: 1.5rem auto 0;
}

@keyframes sc-results-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── VERDICT CARD ── */
.sc-verdict {
  padding: 20px 22px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid transparent;
}

.sc-verdict.underpaid {
  background: rgba(244, 63, 94, 0.07);
  border-color: rgba(244, 63, 94, 0.2);
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.08);
}
.sc-verdict.underpaid .sc-verdict-title { color: #e11d48; }
.sc-verdict.underpaid .sc-verdict-sub  { color: #881337; }

.sc-verdict.fair {
  background: rgba(6, 95, 70, 0.07);
  border-color: rgba(6, 95, 70, 0.2);
  box-shadow: 0 4px 20px rgba(6, 95, 70, 0.08);
}
.sc-verdict.fair .sc-verdict-title { color: #065f46; }
.sc-verdict.fair .sc-verdict-sub  { color: #064e3b; }

.sc-verdict.above {
  background: rgba(67, 56, 202, 0.07);
  border-color: rgba(67, 56, 202, 0.2);
  box-shadow: 0 4px 20px rgba(67, 56, 202, 0.08);
}
.sc-verdict.above .sc-verdict-title { color: #4338ca; }
.sc-verdict.above .sc-verdict-sub  { color: #312e81; }

/* Verdict top row */
.sc-verdict-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.sc-verdict-emoji {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.sc-verdict-body { flex: 1; min-width: 0; }

.sc-verdict-title {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display), 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  line-height: 1.2;
  word-break: break-word;
}

.sc-verdict-sub {
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
}

/* Money box — only for underpaid */
.sc-verdict-money {
  flex-shrink: 0;
  text-align: right;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  min-width: 90px;
  margin-left: 4px;
}

.sc-verdict-money-label {
  font-size: 10px;
  margin-bottom: 2px;
  opacity: 0.7;
  white-space: nowrap;
}

.sc-verdict-money-val {
  font-family: var(--font-display), 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

/* Negotiation link row */
.sc-verdict-nego {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 63, 94, 0.15);
  font-size: 13px;
  line-height: 1.5;
}

.sc-verdict-nego a {
  color: #e11d48;
  font-weight: 700;
  text-decoration: none;
}

.sc-verdict-nego a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 640px) {
  .sc-verdict-top { flex-wrap: wrap; }
  .sc-verdict-money {
    flex: 0 0 100%;
    text-align: left;
    margin-left: 42px;
    padding: 8px 12px;
    margin-top: 8px;
  }
  .sc-verdict-title { font-size: 16px; }
  .sc-verdict-sub   { font-size: 13px; }
}

/* ── SECTION LABELS ── */
.sc-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ewm-muted, #6b6b69);
  margin: 1.5rem 0 0.75rem;
}

/* ── COUNTRY GRID ── */
.sc-country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sc-country-card {
  background: var(--ewm-card, #fff);
  border: 1.5px solid var(--ewm-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: sc-card-in 0.35s ease both;
}

.sc-country-card:nth-child(2) { animation-delay: 0.04s; }
.sc-country-card:nth-child(3) { animation-delay: 0.08s; }
.sc-country-card:nth-child(4) { animation-delay: 0.12s; }
.sc-country-card:nth-child(5) { animation-delay: 0.16s; }
.sc-country-card:nth-child(6) { animation-delay: 0.20s; }

@keyframes sc-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sc-country-card:hover {
  border-color: var(--ewm-border-2, rgba(0, 0, 0, 0.14));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sc-country-card.is-you {
  border-color: var(--ewm-accent, #4338ca);
  box-shadow: 0 4px 16px rgba(67, 56, 202, 0.15);
  background: rgba(67, 56, 202, 0.03);
}

.sc-country-card.is-you:hover {
  border-color: var(--ewm-accent, #4338ca);
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.2);
}

.sc-cc-flag  { font-size: 1.75rem; margin-bottom: 6px; line-height: 1; }
.sc-cc-name  {
  font-size: 0.68rem;
  color: var(--ewm-muted, #6b6b69);
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sc-cc-val   {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ewm-text, #1a1a18);
  font-family: var(--font-display), 'Plus Jakarta Sans', system-ui, sans-serif;
  margin-bottom: 4px;
}
.sc-cc-you   {
  font-size: 0.68rem;
  color: var(--ewm-accent, #4338ca);
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.sc-cc-gap   { font-size: 0.72rem; margin-top: 4px; font-weight: 600; }
.sc-cc-gap.pos { color: #065f46; }
.sc-cc-gap.neg { color: #e11d48; }
.sc-cc-gap.neu { color: var(--ewm-muted, #6b6b69); }

/* Nested span colors for gapLabel() */
.sc-cc-gap .pos { color: #065f46; }
.sc-cc-gap .neg { color: #e11d48; }
.sc-cc-gap .neu { color: var(--ewm-muted, #6b6b69); }

@media (max-width: 640px) {
  .sc-country-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sc-country-card { padding: 12px 8px; }
  .sc-cc-flag { font-size: 1.5rem; }
  .sc-cc-val  { font-size: 0.95rem; }
}

@media (max-width: 400px) {
  .sc-country-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── POSITION BAR ── */
.sc-bar-wrap { margin-bottom: 2rem; }

.sc-bar-track {
  position: relative;
  height: 12px;
  background: linear-gradient(
    to right,
    rgba(244, 63, 94, 0.15) 0%,
    rgba(251, 191, 36, 0.15) 50%,
    rgba(6, 95, 70, 0.15) 100%
  );
  border-radius: 999px;
  margin-bottom: 14px;
  overflow: visible;
}

.sc-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(244,63,94,0.5), rgba(251,191,36,0.3));
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.sc-bar-marker {
  position: absolute;
  top: -8px;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 3px solid var(--ewm-accent, #4338ca);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 0 4px rgba(67, 56, 202, 0.12),
    0 4px 12px rgba(67, 56, 202, 0.25);
  animation: sc-marker-land 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.4s;
}

@keyframes sc-marker-land {
  from {
    transform: translateX(-50%) scale(0.4);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

/* Marker glow pulse on appear */
.sc-bar-marker::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--ewm-accent, #4338ca);
  opacity: 0;
  animation: sc-marker-pulse 2s ease-out 0.8s forwards;
}

@keyframes sc-marker-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}

.sc-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ewm-muted, #6b6b69);
  font-weight: 600;
}

/* ── CTA BOX ── */
.sc-cta-box {
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.06) 0%, rgba(6, 95, 70, 0.05) 100%);
  border: 1.5px solid rgba(67, 56, 202, 0.18);
  border-radius: 14px;
  padding: 22px 20px;
  margin-top: 1.5rem;
}

.sc-cta-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--ewm-text, #1a1a18);
  font-family: var(--font-display), 'Plus Jakarta Sans', system-ui, sans-serif;
}

.sc-cta-desc {
  font-size: 0.875rem;
  color: var(--ewm-muted, #6b6b69);
  margin-bottom: 14px;
  line-height: 1.6;
}

.sc-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.sc-btn-primary {
  background: linear-gradient(135deg, var(--ewm-accent, #4338ca), var(--ewm-accent-hover, #3730a3));
  color: #fff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(67, 56, 202, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border: none;
}

.sc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.4);
}

.sc-btn-primary:active { transform: translateY(0); }

.sc-btn-secondary {
  background: rgba(67, 56, 202, 0.07);
  color: var(--ewm-accent, #4338ca);
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1.5px solid rgba(67, 56, 202, 0.2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.sc-btn-secondary:hover {
  background: rgba(67, 56, 202, 0.12);
  border-color: rgba(67, 56, 202, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .sc-btn-primary,
  .sc-btn-secondary { width: 100%; justify-content: center; }
  .sc-cta-btns { flex-direction: column; }
}

/* ── cream EWM colors (force text readable on cream bg) ── */
.sc-verdict-title { color: inherit; }
.sc-verdict-sub   { color: inherit; }
.sc-cta-title    { color: var(--ewm-text, #1a1a18); }
.sc-cc-val        { color: var(--ewm-text, #1a1a18); }
.sc-country-card.is-you .sc-cc-val { color: var(--ewm-accent, #4338ca); }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO REDESIGN — Premium animated hero
   ═══════════════════════════════════════════════════════════════════════════ */

.sc-hero {
  background: var(--ewm-card, #fff);
  border: 1px solid var(--ewm-border, rgba(0,0,0,0.08));
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* Subtle gradient ambient glow top-right */
.sc-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(67,56,202,0.07) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

/* ── Stats Row ── */
.sc-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ewm-border, rgba(0,0,0,0.07));
}

.sc-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 0 12px;
  position: relative;
  animation: sc-hero-fadein 0.6s ease both;
}

.sc-hero-stat:nth-child(1) { animation-delay: 0.05s; }
.sc-hero-stat:nth-child(2) { animation-delay: 0.15s; }
.sc-hero-stat:nth-child(3) { animation-delay: 0.25s; }

@keyframes sc-hero-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sc-hero-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 36px;
  background: var(--ewm-border, rgba(0,0,0,0.08));
}

.sc-hero-stat-icon {
  color: var(--ewm-muted, #6b6b69);
  opacity: 0.6;
  margin-bottom: 2px;
}

.sc-hero-stat-val {
  font-family: var(--font-display, 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.sc-hero-stat-label {
  font-size: 0.7rem;
  color: var(--ewm-muted, #6b6b69);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Bar Chart ── */
.sc-hero-chart {
  position: relative;
}

.sc-hero-chart-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sc-hero-chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ewm-text, #1a1a18);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.sc-hero-chart-sub {
  font-size: 0.7rem;
  color: var(--ewm-muted, #6b6b69);
}

.sc-hero-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-hero-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
}

.sc-hero-bar-key {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ewm-muted, #6b6b69);
}

.sc-hero-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sc-hero-bar-track {
  height: 10px;
  background: var(--ewm-bg-3, #eeecea);
  border-radius: 99px;
  overflow: visible;
  position: relative;
}

/* Bar fills — CSS-only animation from 0 to target width */
.sc-hero-bar-fill {
  height: 100%;
  border-radius: 99px;
  position: relative;
  width: 0%;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-iteration-count: 1;
}

.sc-hero-bar-fill--entry {
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  animation-name: sc-bar-entry;
  animation-duration: 1s;
  animation-delay: 0.3s;
}

.sc-hero-bar-fill--mid {
  background: linear-gradient(90deg, #4338CA, #6366F1);
  animation-name: sc-bar-mid;
  animation-duration: 1s;
  animation-delay: 0.5s;
}

.sc-hero-bar-fill--senior {
  background: linear-gradient(90deg, #1e1b4b, #4338CA);
  animation-name: sc-bar-senior;
  animation-duration: 1s;
  animation-delay: 0.7s;
}

@keyframes sc-bar-entry  { from { width: 0%; } to { width: 50%; } }
@keyframes sc-bar-mid    { from { width: 0%; } to { width: 66%; } }
@keyframes sc-bar-senior { from { width: 0%; } to { width: 100%; } }

/* Salary label tooltip on bar — appears after bar animation completes */
.sc-hero-bar-tip {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ewm-text, #1a1a18);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  /* Fade in after bar finishes expanding (1s + delay) */
  transition: opacity 0.4s ease 1.3s;
}

.sc-hero-bar-fill--entry  .sc-hero-bar-tip { background: #6c5ce7; }
.sc-hero-bar-fill--mid    .sc-hero-bar-tip { background: #4338CA; }
.sc-hero-bar-fill--senior .sc-hero-bar-tip { background: #1e1b4b; }

/* Show tips after bar animation completes */
.sc-hero-bar-fill--entry  { animation-delay: 0.3s; }
.sc-hero-bar-fill--mid    { animation-delay: 0.5s; }
.sc-hero-bar-fill--senior { animation-delay: 0.7s; }

.sc-hero-chart-foot {
  font-size: 0.65rem;
  color: var(--ewm-muted, #6b6b69);
  margin-top: 10px;
  text-align: right;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .sc-hero { padding: 18px 16px; border-radius: 14px; margin-bottom: 20px; }
  .sc-hero-stats { grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 18px; padding-bottom: 16px; }
  .sc-hero-stat-val { font-size: 1.3rem; }
  .sc-hero-stat-label { font-size: 0.62rem; }
  .sc-hero-stat-icon { display: none; }
  .sc-hero-stat:not(:last-child)::after { height: 28px; }
  .sc-hero-bar-row { grid-template-columns: 64px 1fr; gap: 8px; }
  .sc-hero-bar-key { font-size: 0.65rem; }
  .sc-hero-chart-title { font-size: 0.72rem; }
  .sc-hero-chart-sub { display: none; }
  .sc-hero-chart-foot { font-size: 0.6rem; }
}

@media (max-width: 400px) {
  .sc-hero-stats { grid-template-columns: 1fr; }
  .sc-hero-stat { flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; padding: 6px 0; }
  .sc-hero-stat:not(:last-child) { border-bottom: 1px solid var(--ewm-border, rgba(0,0,0,0.07)); }
  .sc-hero-stat:not(:last-child)::after { display: none; }
  .sc-hero-stat-val { font-size: 1.2rem; }
  .sc-hero-bar-row { grid-template-columns: 56px 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sc-hero-stat, .sc-hero-bar-fill, .sc-hero-bar-tip {
    animation: none !important;
    transition: none !important;
  }
  .sc-hero-bar-fill--entry  { width: 50% !important; animation: none !important; }
  .sc-hero-bar-fill--mid    { width: 66% !important; animation: none !important; }
  .sc-hero-bar-fill--senior { width: 100% !important; animation: none !important; }
  .sc-hero-bar-tip { opacity: 1 !important; }
}
