/* ============================================================
   Salary calculator — WordPress build.
   Every rule is scoped under .salary-calc so the stylesheet is
   safe to enqueue anywhere: it cannot affect the theme, and the
   theme's global styles are unlikely to leak in.
   ============================================================ */

.salary-calc {
  /* design tokens */
  --almost-white: #f4f4f9;
  --almost-black: #09090b;
  --gray-100: #5c5a62;
  --gray-200: #4b4551;
  --primary: #0891d4;
  --primary-light: #9fd8f0;
  --primary-hero: #0891d4;
  --border: #e4e4ec;
  --radius: 0.625rem;

  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--almost-black);
  font-weight: 300;
  line-height: 1.5;
}

.salary-calc,
.salary-calc *,
.salary-calc *::before,
.salary-calc *::after { box-sizing: border-box; }

.salary-calc h1, .salary-calc h2, .salary-calc h3,
.salary-calc p, .salary-calc form, .salary-calc table { margin: 0; padding: 0; }

.salary-calc a { color: inherit; text-decoration: none; }
.salary-calc button { font: inherit; }

/* ============ Heading ============ */
.salary-calc .calc-hero { padding: 56px 0 0; }

.salary-calc .calc-hero h1 {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 640px;
}

/* ============ Tabs ============ */
.salary-calc .calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 40px;
}

.salary-calc .calc-tabs a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-100);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s;
}

.salary-calc .calc-tabs a:hover { color: var(--almost-black); }

.salary-calc .calc-tabs a.active {
  background: #e2f2fb;
  border-color: var(--primary-hero);
  color: var(--almost-black);
}

/* ============ Form ============ */
.salary-calc .calc-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: end;
  padding-bottom: 56px;
}

.salary-calc .form-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--gray-100);
  font-size: 14px;
  font-weight: 400;
}

.salary-calc .form-item.col-1 { grid-column-start: 1; }

.salary-calc .form-item label {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  user-select: none;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.salary-calc .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  background: #fcfcfd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 4px 0 12px;
  transition: border-color 0.15s;
}

.salary-calc .input-wrap:focus-within { border-color: var(--primary); }

.salary-calc .input-wrap.amount { border-color: var(--primary); }

.salary-calc .input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: 300;
  font-size: 15px;
  color: var(--almost-black);
}

.salary-calc .input-wrap input:focus { outline: 0; box-shadow: none; }

.salary-calc .input-wrap input::-webkit-outer-spin-button,
.salary-calc .input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.salary-calc .input-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.salary-calc .input-suffix {
  font-size: 14px;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.6);
  padding: 0 10px;
  user-select: none;
}

.salary-calc .unit-select {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  color: var(--almost-black);
  cursor: pointer;
  padding: 0 6px 0 0;
  margin: 0;
  width: auto;
  height: auto;
}

.salary-calc select.field-select {
  height: 48px;
  width: 100%;
  margin: 0;
  background: #fcfcfd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 34px 0 12px;
  font: inherit;
  font-weight: 300;
  font-size: 14px;
  color: var(--almost-black);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2309090b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.salary-calc select.field-select:focus { outline: 0; border-color: var(--primary); box-shadow: none; }

.salary-calc .check-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--gray-100);
  font-size: 14px;
  font-weight: 400;
}

.salary-calc .check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #c9c9d4;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.salary-calc .check-item input[type="checkbox"]:checked {
  background: var(--almost-black);
  border-color: var(--almost-black);
}

.salary-calc .check-item input[type="checkbox"]:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.salary-calc .check-item label { cursor: pointer; }

/* Hidden form items (e.g. PPK rate inputs before the checkbox is enabled) */
.salary-calc .form-item[hidden] { display: none; }

@media (max-width: 900px) {
  .salary-calc .calc-form { grid-template-columns: repeat(2, 1fr); }
  .salary-calc .form-item.col-1 { grid-column-start: auto; }
}

@media (max-width: 520px) {
  .salary-calc .calc-form { grid-template-columns: 1fr; }
}

/* ============ Results ============ */
.salary-calc .results-section { padding: 26px 0 10px; }

.salary-calc .results-section h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.salary-calc .avg-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 300;
  color: var(--gray-100);
}

.salary-calc .avg-line .arrow { font-weight: 300; }
.salary-calc .avg-line strong { color: var(--almost-black); font-weight: 600; }

.salary-calc .results-panel {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 48px;
}

.salary-calc .donut-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.salary-calc .donut-wrap svg { display: block; max-width: 100%; height: auto; }

.salary-calc .donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 0 40px;
}

.salary-calc .donut-center .line-light {
  font-size: 17px;
  color: var(--gray-100);
  font-weight: 300;
}

.salary-calc .donut-center .line-bold {
  font-size: 18px;
  font-weight: 600;
  color: var(--almost-black);
}

.salary-calc .legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
}

.salary-calc .legend-item {
  border-top: 1px solid #dcdce4;
  padding: 20px 0 22px;
  font-size: 16px;
}

.salary-calc .legend-item .li-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: var(--almost-black);
}

.salary-calc .legend-item .swatch {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.salary-calc .legend-item .li-value {
  margin: 6px 0 0 22px;
  color: var(--gray-100);
  font-weight: 300;
}

.salary-calc .legend-total {
  grid-column: 1 / -1;
  border-top: 1px solid #dcdce4;
  padding: 20px 0 6px;
  font-size: 16px;
}

.salary-calc .legend-total .lt-label { font-weight: 300; color: var(--almost-black); }
.salary-calc .legend-total .lt-value { font-weight: 600; margin-top: 4px; }

@media (max-width: 900px) {
  .salary-calc .results-panel { grid-template-columns: 1fr; }
  .salary-calc .legend { grid-template-columns: 1fr; }
}

/* ============ Monthly table ============ */
.salary-calc .table-wrap {
  overflow-x: auto;
  margin: 56px 0 40px;
}

.salary-calc table.monthly {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  border: 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--gray-100);
}

.salary-calc table.monthly th {
  font-weight: 500;
  color: var(--almost-black);
  text-align: left;
  padding: 14px 12px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.salary-calc table.monthly th.group-head {
  font-weight: 400;
  font-size: 12px;
  border-bottom: 1px solid #dcdce4;
}

.salary-calc table.monthly td {
  padding: 13px 12px;
  border: 0;
  white-space: nowrap;
}

.salary-calc table.monthly tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.55); }

.salary-calc table.monthly td.strong,
.salary-calc table.monthly .sum-row td { color: var(--almost-black); }

.salary-calc table.monthly td:last-child { font-weight: 500; color: var(--almost-black); }

.salary-calc table.monthly .sum-row {
  background: #fff !important;
  font-weight: 400;
}

/* ============ Info text ============ */
.salary-calc .info-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px 0 90px;
}

.salary-calc .info-cols h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
}

.salary-calc .info-cols p {
  font-size: 16px;
  color: var(--gray-200);
  line-height: 1.9;
}

@media (max-width: 800px) {
  .salary-calc .info-cols { grid-template-columns: 1fr; }
}
