/* ─── Löneräknare – Calculator styles ────────────────────────────────────────
   Alla regler är scopade till .lk-wrap för att undvika konflikter med temat.
   ──────────────────────────────────────────────────────────────────────────── */

.lk-wrap *,
.lk-wrap *::before,
.lk-wrap *::after { box-sizing: border-box; }

/* ─── Year bar ───────────────────────────────────────────────────────────── */
.lk-year-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: .875rem;
  color: #475569;
}

.lk-year-tabs {
  display: flex;
  gap: 4px;
}

.lk-year-tab {
  padding: 5px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  font-size: .875rem;
  cursor: pointer;
  color: #475569;
  transition: border-color .15s, background .15s, color .15s;
}

.lk-year-tab:hover { border-color: #1e40af; color: #1e40af; }
.lk-year-tab.is-active { background: #1e40af; border-color: #1e40af; color: #fff; }

/* ─── Grid layout ────────────────────────────────────────────────────────── */
.lk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "inputs  results"
    "breakdown chart";
  gap: 20px;
}

@media (max-width: 680px) {
  .lk-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inputs"
      "results"
      "breakdown"
      "chart";
  }
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.lk-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

.lk-card--inputs    { grid-area: inputs;    }
.lk-card--results   { grid-area: results;   }
.lk-card--breakdown { grid-area: breakdown; }
.lk-card--chart     { grid-area: chart;     }

.lk-card-title {
  margin: 0 0 18px;
  font-size: .8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ─── Form fields ────────────────────────────────────────────────────────── */
.lk-field { margin-bottom: 18px; }
.lk-field:last-child { margin-bottom: 0; }

.lk-label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 5px;
}

.lk-input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  transition: border-color .15s;
}
.lk-input-group:focus-within { border-color: #1e40af; }

.lk-input {
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 1.05rem;
  width: 100%;
  font-family: inherit;
  color: #1e293b;
  background: transparent;
  -moz-appearance: textfield;
}
.lk-input::-webkit-outer-spin-button,
.lk-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.lk-unit {
  padding: 0 12px;
  background: #f8fafc;
  border-left: 1.5px solid #e2e8f0;
  font-size: .8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  white-space: nowrap;
  user-select: none;
}

/* Range slider */
.lk-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 10px;
  outline: none;
  cursor: pointer;
}
.lk-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #1e40af;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30,64,175,.35);
}
.lk-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #1e40af;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Select */
.lk-select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: .92rem;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
.lk-select:focus { border-color: #1e40af; }

/* ─── Result hero ────────────────────────────────────────────────────────── */
.lk-net-hero {
  text-align: center;
  padding: 8px 0 18px;
}

.lk-net-label {
  font-size: .82rem;
  color: #64748b;
  margin-bottom: 5px;
}

.lk-net-amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: #1e40af;
  line-height: 1;
  letter-spacing: -1px;
}

.lk-net-unit {
  font-size: .875rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* ─── Stats grid ─────────────────────────────────────────────────────────── */
.lk-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lk-stat {
  background: #f8fafc;
  border-radius: 9px;
  padding: 11px 13px;
}

.lk-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.lk-stat-label {
  font-size: .72rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* ─── Breakdown table ────────────────────────────────────────────────────── */
.lk-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: .875rem;
  gap: 10px;
}

.lk-breakdown-row:last-child {
  border-bottom: none;
  border-top: 2px solid #e2e8f0;
  padding-top: 11px;
  margin-top: 4px;
  font-weight: 700;
  font-size: .95rem;
}

.lk-br-label { color: #475569; flex: 1; }
.lk-br-val   { font-weight: 500; white-space: nowrap; }
.lk-br-sub   { font-size: .72rem; color: #94a3b8; margin-left: 3px; }
.lk-br-neg   { color: #dc2626; }
.lk-br-pos   { color: #16a34a; }
.lk-br-net   { color: #1e40af; }

/* ─── Chart ──────────────────────────────────────────────────────────────── */
.lk-chart-wrap {
  position: relative;
  max-width: 240px;
  margin: 0 auto;
}

.lk-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
}

.lk-legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .85rem;
}

.lk-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lk-legend-lbl { color: #475569; flex: 1; }
.lk-legend-pct { font-weight: 600; color: #1e293b; }

/* ─── Disclaimer ─────────────────────────────────────────────────────────── */
.lk-disclaimer {
  font-size: .75rem;
  color: #94a3b8;
  text-align: center;
  margin: 18px 0 0;
  line-height: 1.5;
}

/* ─── No-data notice ─────────────────────────────────────────────────────── */
.lonekalkylator-notice {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 14px 18px;
  color: #713f12;
  font-size: .9rem;
}

/* ─── Combobox ───────────────────────────────────────────────────────────── */
.lk-combobox {
  position: relative;
}

.lk-combobox-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: .92rem;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  outline: none;
  cursor: text;
  transition: border-color .15s;
  box-sizing: border-box;
}

.lk-combobox-input:focus {
  border-color: #1e40af;
}

.lk-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
}

.lk-combobox-option {
  padding: 9px 12px;
  font-size: .92rem;
  color: #1e293b;
  cursor: pointer;
  transition: background .1s;
}

.lk-combobox-option:hover {
  background: #f1f5f9;
}

.lk-combobox-option.is-active {
  background: #e0e7ff;
  color: #1e3a8a;
}
