/* =============================================================================
   Vacation pay calculator (/mezuniyyet-pulu) — JobHub-styled.
   Two columns: the input panel on the left, the live result on the right, with
   the calculation steps and the end-of-month breakdown below. All colours come
   from --hb-* so both themes follow the global toggle.
   ============================================================================= */

/* hero formula chip */
.mp-hero-formula {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 24px; padding: 10px 20px; background: rgba(151, 119, 250, 0.10); border-radius: 999px;
}
.mp-hero-formula span { color: var(--hb-muted); font-weight: 600; font-size: 14px; }
.mp-hero-formula code { font-family: "Montserrat", monospace; color: var(--hb-brand); font-weight: 600; font-size: 15px; }

/* ── Input panel ── */
.mp-panel { padding: 30px; }
.mp-panel-title {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 20px;
  color: var(--hb-heading); margin-bottom: 24px;
}

.mp-field { margin-bottom: 22px; }
.mp-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--hb-heading); margin-bottom: 8px;
}
.mp-hint { font-size: 12px; line-height: 1.5; color: var(--hb-muted); margin: 6px 0 0; }
.mp-hint-top { margin: 0 0 10px; }
.mp-hint-muted { margin-top: 14px; font-style: italic; }

.mp-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hb-border); border-radius: 10px;
  background: var(--hb-surface); color: var(--hb-heading);
  font-family: "Open Sans", sans-serif; font-size: 15px; height: auto;
}
.mp-input:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px rgba(151, 119, 250, 0.15); }
.mp-input::placeholder { color: var(--hb-muted); }
select.mp-input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--hb-muted) 50%), linear-gradient(135deg, var(--hb-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.mp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mp-grid-2.mp-grid-tight { gap: 10px; }
.mp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* sector switch */
.mp-sector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mp-sector-btn {
  padding: 12px 10px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); color: var(--hb-text);
  font-family: "Montserrat", sans-serif; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
}
.mp-sector-btn:hover { border-color: var(--hb-brand); color: var(--hb-heading); }
.mp-sector-btn.is-active {
  border-color: var(--hb-brand); color: var(--hb-brand);
  background: rgba(151, 119, 250, 0.10); box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.22);
}

/* day presets */
.mp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mp-preset {
  padding: 5px 11px; border: 1px solid var(--hb-border); border-radius: 8px;
  background: var(--hb-surface); color: var(--hb-muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease;
}
.mp-preset:hover { border-color: var(--hb-brand); color: var(--hb-heading); }
.mp-preset.is-active { border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10); color: var(--hb-brand); }

/* ── 12-month salary table ── */
.mp-table { border: 1px solid var(--hb-border); border-radius: 12px; overflow: hidden; }
.mp-table-head,
.mp-table-row {
  display: grid; grid-template-columns: 74px 1fr 130px; gap: 10px;
  align-items: center; padding: 8px 14px;
}
.mp-table-head {
  background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--hb-muted);
}
.mp-table-row + .mp-table-row { border-top: 1px solid var(--hb-border); }
.mp-table-row .mp-cell-year { font-size: 13px; color: var(--hb-muted); }
.mp-table-row .mp-cell-month { font-size: 14px; font-weight: 600; color: var(--hb-heading); }
.mp-table-row .mp-amount { padding: 8px 12px; font-size: 14px; text-align: right; }
.mp-ta-right { text-align: right; }

.mp-table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--hb-surface); border-top: 1px solid var(--hb-border);
}
.mp-total { font-size: 13px; color: var(--hb-muted); font-weight: 600; }
.mp-total strong { margin-left: 6px; font-size: 15px; color: var(--hb-brand); }
.mp-link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--hb-brand); text-decoration: underline;
}
.mp-link-btn:hover { color: var(--hb-brand-hover); }

/* ── Vacation-month sub-card ── */
.mp-subcard {
  margin: 26px 0 0; padding: 20px; border-radius: 14px;
  background: rgba(245, 179, 1, 0.06); border: 1px solid rgba(245, 179, 1, 0.28);
}
.mp-subcard-head { margin-bottom: 16px; }
.mp-subcard-head h3 {
  display: flex; align-items: center; gap: 8px;
  font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 700;
  color: var(--hb-heading); margin-bottom: 4px;
}
.mp-subcard-head p { font-size: 12.5px; color: var(--hb-muted); margin: 0; }
.mp-subcard .mp-field { margin-bottom: 0; }

.mp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ── Result column ── */
.mp-result {
  position: sticky; top: 96px;
  padding: 26px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.mp-result-placeholder { text-align: center; padding: 30px 10px; color: var(--hb-muted); }
.mp-result-icon { font-size: 44px; margin-bottom: 12px; }
.mp-result-placeholder p { font-size: 14px; line-height: 1.6; margin: 0; }

.mp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mp-card { padding: 18px 16px; border-radius: 14px; text-align: center; color: #fff; }
.mp-card-gross { background: linear-gradient(135deg, #9777fa, #6d4bd3); }
.mp-card-net   { background: linear-gradient(135deg, #12b76a, #06894d); }
.mp-card-label { font-size: 12px; line-height: 1.4; opacity: 0.86; margin: 0 0 6px; }
.mp-card-value {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 27px; line-height: 1.1;
  margin: 0; word-break: break-word;
}
.mp-card-unit { font-size: 11px; opacity: 0.8; margin: 4px 0 0; }

.mp-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.mp-mini {
  padding: 12px 14px; border-radius: 12px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.mp-mini-label { display: block; font-size: 11.5px; color: var(--hb-muted); margin-bottom: 4px; }
.mp-mini-value { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 15px; color: var(--hb-heading); }

/* ── Shared block (deductions, summary, steps, end-of-month) ── */
.mp-block {
  margin-top: 18px; border: 1px solid var(--hb-border); border-radius: 14px; overflow: hidden;
  background: var(--hb-card);
}
.mp-block-flat { margin-top: 0; }
.mp-block-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 14.5px; color: var(--hb-heading);
}
.mp-block-head.is-amber { background: rgba(245, 179, 1, 0.10); }
.mp-block-head small { flex: 1 1 100%; font-family: "Open Sans", sans-serif; font-weight: 400; font-size: 12px; color: var(--hb-muted); }

.mp-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 10px 16px; font-size: 13.5px; color: var(--hb-muted);
}
.mp-row + .mp-row { border-top: 1px solid var(--hb-border); }
.mp-row small { display: block; margin-top: 3px; font-size: 11.5px; }
.mp-row-value { flex-shrink: 0; font-weight: 600; color: var(--hb-heading); white-space: nowrap; }
.mp-row.is-total { background: var(--hb-surface); color: var(--hb-heading); font-weight: 700; }
.mp-row.is-total .mp-row-value { font-weight: 700; }
.mp-row.is-net { background: rgba(18, 183, 106, 0.10); color: #0a8f51; font-weight: 700; }
.mp-row.is-net .mp-row-value { color: #0a8f51; }
:root[data-theme="dark"] .mp-row.is-net,
:root[data-theme="dark"] .mp-row.is-net .mp-row-value { color: #38d98a; }

/* summary */
.mp-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.mp-summary-item {
  padding: 12px 10px; border-radius: 10px; text-align: center;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.mp-summary-item strong { font-family: "Montserrat", sans-serif; font-size: 14px; color: var(--hb-heading); }
.mp-summary-item.is-highlight { background: rgba(151, 119, 250, 0.12); border-color: rgba(151, 119, 250, 0.32); }
.mp-summary-item.is-highlight strong { color: var(--hb-brand); }

/* ── Calculation steps ── */
.mp-step { padding: 14px 16px; }
.mp-step + .mp-step { border-top: 1px solid var(--hb-border); }
.mp-step.is-final { background: rgba(151, 119, 250, 0.07); }
.mp-step-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--hb-heading);
}
.mp-step-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hb-brand); color: #fff; font-size: 11.5px; font-weight: 700;
}
.mp-step-body {
  margin-left: 34px; padding: 12px 14px; border-radius: 10px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.mp-step-body p { font-size: 13px; color: var(--hb-text); margin: 0; }
.mp-step-body p strong { color: var(--hb-brand); }
.mp-step-body .mp-hint { margin-top: 6px; }

.mp-step-months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; margin-bottom: 10px; }
.mp-step-month { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--hb-muted); }
.mp-step-month.is-filled span:last-child { color: var(--hb-heading); font-weight: 600; }
.mp-step-sum { border-top: 1px solid var(--hb-border); padding-top: 9px; font-size: 12.5px; }
.mp-step-sum strong { color: var(--hb-brand); }

/* ── Explainer ── */
.mp-explain-card {
  height: 100%; padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.mp-explain-lead { font-weight: 700; font-size: 14.5px; color: var(--hb-heading); margin-bottom: 14px; }
/* JobHub resets `ol, ul { list-style: none }` globally — the step numbers are
   the content here, so put the decimal markers back. */
.mp-explain-list { margin: 0; padding-left: 22px; list-style: decimal outside; }
.mp-explain-list li { font-size: 13.5px; line-height: 1.65; color: var(--hb-text); margin-bottom: 10px; }
.mp-explain-list li::marker { color: var(--hb-brand); font-weight: 700; }
.mp-explain-note { display: block; margin-top: 4px; font-size: 12.5px; font-style: italic; color: var(--hb-muted); }

.mp-minimums {
  margin-top: 24px; padding: 22px 24px; border-radius: 16px;
  background: rgba(81, 146, 255, 0.07); border: 1px solid rgba(81, 146, 255, 0.24);
}
.mp-minimums h3 {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 700; color: var(--hb-heading);
}
.mp-minimums-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mp-minimum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 10px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
  font-size: 13px; color: var(--hb-muted);
}
.mp-minimum strong { color: var(--hb-heading); white-space: nowrap; }

.mp-disclaimer {
  max-width: 760px; margin: 24px auto 0; text-align: center;
  font-size: 12.5px; line-height: 1.7; color: var(--hb-muted);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .mp-result { position: static; }
}
@media (max-width: 767px) {
  .mp-panel { padding: 24px 18px; }
  .mp-grid-2, .mp-grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .mp-grid-2.mp-grid-tight { grid-template-columns: 1fr 1fr; }
  .mp-cards, .mp-mini-stats { grid-template-columns: 1fr; }
  .mp-summary-grid { grid-template-columns: 1fr; }
  .mp-step-months { grid-template-columns: 1fr; }
  .mp-table-head, .mp-table-row { grid-template-columns: 58px 1fr 108px; gap: 8px; padding: 8px 10px; }
  .mp-step-body { margin-left: 0; }
}
