/* =============================================================================
   Business-trip allowance calculator (/ezamiyye) — JobHub-styled.
   Mode switch, destination picker (or route legs) on the left; the live total,
   the 30/70 split and the breakdown on the right. Colours derive from --hb-*.

   NOTE: hero chip / panel / block-row / explainer rules repeat across
   mezuniyyet.css, ipoteka.css, elave-is-saati.css and this file. A shared
   calculator stylesheet is overdue.
   ============================================================================= */

/* hero formula chip */
.ez-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;
}
.ez-hero-formula span { color: var(--hb-muted); font-weight: 600; font-size: 14px; }
.ez-hero-formula code { font-family: "Montserrat", monospace; color: var(--hb-brand); font-weight: 600; font-size: 15px; }

/* ── Input panel ── */
.ez-panel { padding: 30px; }
.ez-field { margin-bottom: 24px; }
.ez-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--hb-heading); margin-bottom: 10px;
}

.ez-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;
}
.ez-input:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px rgba(151, 119, 250, 0.15); }
.ez-input::placeholder { color: var(--hb-muted); }
select.ez-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;
}

/* mode switch — one segmented control */
.ez-modes {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--hb-border); border-radius: 12px; overflow: hidden;
}
.ez-mode-btn {
  padding: 13px 10px; border: 0; background: var(--hb-surface); color: var(--hb-muted);
  font-family: "Montserrat", sans-serif; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
}
.ez-mode-btn:hover { color: var(--hb-heading); }
.ez-mode-btn.is-active { background: var(--hb-brand); color: #fff; }

/* destination cards */
.ez-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ez-region-btn {
  padding: 13px 14px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); text-align: left; cursor: pointer; transition: all 0.18s ease;
}
.ez-region-btn:hover { border-color: var(--hb-brand); }
.ez-region-btn.is-active {
  border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10);
  box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.20);
}
.ez-region-name {
  display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  color: var(--hb-heading); margin-bottom: 3px;
}
.ez-region-btn.is-active .ez-region-name { color: var(--hb-brand); }
.ez-region-norm { display: block; font-size: 11.5px; color: var(--hb-muted); }
.ez-region-norm strong { color: var(--hb-heading); }
.ez-region-btn.is-active .ez-region-norm,
.ez-region-btn.is-active .ez-region-norm strong { color: var(--hb-brand); }

/* day presets */
.ez-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ez-preset {
  padding: 6px 12px; 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;
}
.ez-preset:hover { border-color: var(--hb-brand); color: var(--hb-heading); }
.ez-preset.is-active { border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10); color: var(--hb-brand); }

/* ── Route legs ── */
.ez-info {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 13px 15px; margin-bottom: 20px; border-radius: 12px;
  background: rgba(81, 146, 255, 0.09); border: 1px solid rgba(81, 146, 255, 0.26);
  font-size: 13px; line-height: 1.55; color: var(--hb-text);
}

.ez-route {
  padding: 15px; border-radius: 12px; margin-bottom: 12px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.ez-route-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ez-route-title { font-family: "Montserrat", sans-serif; font-size: 13.5px; font-weight: 700; color: var(--hb-heading); }
.ez-route-remove {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: #ef5350; transition: color 0.15s ease;
}
.ez-route-remove:hover { color: #c62828; }
.ez-route-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.ez-route-field { display: block; }
.ez-route-field > span { display: block; font-size: 11.5px; color: var(--hb-muted); margin-bottom: 5px; }
.ez-route-field .ez-input { padding: 10px 12px; font-size: 14px; }
.ez-route-field select.ez-input { padding-right: 32px; }

.ez-add-route {
  width: 100%; padding: 13px; border-radius: 12px; cursor: pointer;
  border: 2px dashed rgba(151, 119, 250, 0.38); background: none;
  font-family: "Montserrat", sans-serif; font-size: 13.5px; font-weight: 700; color: var(--hb-brand);
  transition: all 0.18s ease;
}
.ez-add-route:hover { border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.08); }

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

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

.ez-card { padding: 18px 16px; border-radius: 14px; text-align: center; }
.ez-card-main { background: linear-gradient(135deg, #9777fa, #6d4bd3); color: #fff; }
.ez-card-daily { background: rgba(18, 183, 106, 0.10); border: 1px solid rgba(18, 183, 106, 0.30); }
.ez-card-hotel { background: rgba(151, 119, 250, 0.10); border: 1px solid rgba(151, 119, 250, 0.30); }
.ez-cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.ez-card-label { font-size: 12px; line-height: 1.4; margin: 0 0 6px; opacity: 0.9; }
.ez-card-daily .ez-card-label { color: #0a8f51; opacity: 1; }
.ez-card-hotel .ez-card-label { color: var(--hb-brand); opacity: 1; }
.ez-card-value {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 30px; line-height: 1.1;
  margin: 0; word-break: break-word;
}
.ez-card-value-sm {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 19px; line-height: 1.15;
  margin: 0; word-break: break-word;
}
.ez-card-daily .ez-card-value-sm { color: #0a8f51; }
.ez-card-hotel .ez-card-value-sm { color: var(--hb-brand); }
.ez-card-unit { font-size: 11px; margin: 4px 0 0; opacity: 0.8; }
.ez-card-note { font-size: 10.5px; line-height: 1.4; margin: 5px 0 0; }
.ez-card-daily .ez-card-note { color: #0a8f51; }
.ez-card-hotel .ez-card-note { color: var(--hb-brand); }
:root[data-theme="dark"] .ez-card-daily .ez-card-label,
:root[data-theme="dark"] .ez-card-daily .ez-card-value-sm,
:root[data-theme="dark"] .ez-card-daily .ez-card-note { color: #38d98a; }

/* taxi note */
.ez-taxi {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px; padding: 11px 14px; border-radius: 11px;
  background: rgba(245, 179, 1, 0.10); border: 1px solid rgba(245, 179, 1, 0.32);
  font-size: 12px; line-height: 1.5; color: var(--hb-text);
}

/* ── Breakdown ── */
.ez-block {
  margin-top: 16px; border: 1px solid var(--hb-border); border-radius: 14px; overflow: hidden;
  background: var(--hb-card);
}
.ez-block[hidden] { display: none; }
.ez-block-head {
  display: flex; align-items: center; gap: 8px;
  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);
}
.ez-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 10px 16px; font-size: 13px; color: var(--hb-muted);
}
.ez-row + .ez-row { border-top: 1px solid var(--hb-border); }
.ez-row-value { flex-shrink: 0; font-weight: 600; color: var(--hb-heading); white-space: nowrap; }
.ez-row.is-daily { background: rgba(18, 183, 106, 0.09); color: #0a8f51; font-weight: 600; }
.ez-row.is-daily .ez-row-value { color: #0a8f51; font-weight: 700; }
.ez-row.is-hotel { background: rgba(151, 119, 250, 0.09); color: var(--hb-brand); font-weight: 600; }
.ez-row.is-hotel .ez-row-value { color: var(--hb-brand); font-weight: 700; }
.ez-row.is-total {
  background: rgba(81, 146, 255, 0.10); color: var(--hb-blue); font-weight: 700;
  border-top: 1px solid var(--hb-border);
}
.ez-row.is-total .ez-row-value { color: var(--hb-blue); font-weight: 700; }
:root[data-theme="dark"] .ez-row.is-daily,
:root[data-theme="dark"] .ez-row.is-daily .ez-row-value { color: #38d98a; }
:root[data-theme="dark"] .ez-row.is-total,
:root[data-theme="dark"] .ez-row.is-total .ez-row-value { color: #7fb0ff; }

/* per-leg rows */
.ez-leg { padding: 12px 16px; }
.ez-leg + .ez-leg { border-top: 1px solid var(--hb-border); }
.ez-leg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ez-leg-title { font-size: 13px; font-weight: 700; color: var(--hb-heading); }
.ez-leg-total { font-size: 13px; font-weight: 700; color: var(--hb-brand); white-space: nowrap; }
.ez-leg-detail { display: grid; grid-template-columns: 1fr; gap: 2px; }
.ez-leg-detail span { font-size: 11.5px; line-height: 1.5; color: var(--hb-muted); }

/* ── Explainer ── */
.ez-explain-card {
  height: 100%; padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.ez-rule + .ez-rule { margin-top: 16px; }
.ez-rule-title { font-weight: 700; font-size: 13.5px; color: var(--hb-heading); margin-bottom: 7px; }
.ez-rule code {
  display: block; padding: 11px 13px; border-radius: 10px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
  font-family: "Montserrat", monospace; font-size: 12.5px; line-height: 1.5; color: var(--hb-text);
}
.ez-rule.is-total { margin-top: 18px; }
.ez-rule.is-total code {
  background: rgba(151, 119, 250, 0.10); border-color: rgba(151, 119, 250, 0.30);
  color: var(--hb-brand); font-weight: 600;
}

.ez-explain-lead { font-weight: 700; font-size: 14.5px; color: var(--hb-heading); margin-bottom: 14px; }
.ez-norms-list { margin: 0 0 18px; padding: 0; list-style: none; }
.ez-norms-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 13px; border-radius: 10px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
  font-size: 13px; color: var(--hb-muted);
}
.ez-norms-list li + li { margin-top: 8px; }
.ez-norms-list strong { color: var(--hb-heading); white-space: nowrap; }

.ez-note {
  padding: 12px 14px; border-radius: 11px;
  background: rgba(245, 179, 1, 0.09); border: 1px solid rgba(245, 179, 1, 0.30);
  font-size: 12.5px; line-height: 1.65; color: var(--hb-text); margin: 0;
}

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

/* ── Responsive ── */
@media (max-width: 991px) {
  .ez-result { position: static; }
}
@media (max-width: 767px) {
  .ez-panel { padding: 24px 18px; }
  .ez-regions, .ez-cards-2, .ez-route-grid { grid-template-columns: 1fr; }
}
