/* Kalkulatory Ekspertki Finansowe – style przeniesione z Elementora (Custom CSS widgetu)
   + tryb "jeden kalkulator na stronę" (.efk-suite--single). Ładowane tylko przy shortcode. */

.efk-suite{
  --efk-primary:#003785;
  --efk-bg:#ffffff;
  --efk-soft:#f5f7fb;
  --efk-border:#d9e1ef;
  --efk-text:#111;
  --efk-muted:#54657a;

  font-family:Lato,Roboto,Arial,sans-serif;
  max-width:1240px;
  margin:24px auto;
  padding:0 10px;
}
.efk-suite *{box-sizing:border-box;}

.efk-layout{display:grid;grid-template-columns:340px 1fr;gap:18px;}
@media (max-width:960px){.efk-layout{grid-template-columns:1fr;}}

.efk-nav{
  border:1px solid var(--efk-border);
  border-radius:18px;
  padding:12px;
  background:var(--efk-bg);
  box-shadow:0 8px 24px rgba(0,0,0,.04);
}
@media (min-width:961px){.efk-nav{position:sticky;top:12px;}}
.efk-nav button{
  width:100%;
  text-align:left;
  padding:12px 12px;
  border:1px solid transparent;
  border-radius:14px;
  background:transparent;
  cursor:pointer;
  margin:6px 0;
}
.efk-nav button:hover{background:rgba(0,55,133,.05);}
.efk-nav button[aria-selected="true"]{
  background:rgba(0,55,133,.08);
  border-color:rgba(0,55,133,.18);
}
.efk-nav-title{display:block;font-weight:900;color:var(--efk-text);}
.efk-nav-sub{display:block;font-size:12px;color:var(--efk-muted);margin-top:4px;line-height:1.25;}

.efk-panel{
  border:1px solid var(--efk-border);
  border-radius:18px;
  padding:18px;
  background:var(--efk-bg);
  box-shadow:0 8px 24px rgba(0,0,0,.04);
  display:none;
}
.efk-panel[data-active="true"]{display:block;}

.efk-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media (max-width:760px){.efk-grid{grid-template-columns:1fr;}}

.efk-field label{display:block;font-weight:900;font-size:13px;margin:6px 0 6px;color:var(--efk-text);}
.efk-field input,.efk-field select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  font-size:14px;
  outline:none;
}
.efk-field input:focus,.efk-field select:focus{
  border-color:rgba(0,55,133,.35);
  box-shadow:0 0 0 3px rgba(0,55,133,.10);
}

.efk-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px;justify-content:center;}
.efk-actions button{
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.efk-actions button.primary{
  background:var(--efk-primary);
  border-color:var(--efk-primary);
  color:#fff;
}

.efk-output{margin-top:18px;padding:0;border:none;background:transparent;}
.efk-note{font-size:12px;color:var(--efk-muted);line-height:1.55;}

.efk-summary{
  background:var(--efk-soft);
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:16px;
}
.efk-summary h3{margin:0 0 12px;color:var(--efk-primary);font-size:16px;font-weight:900;}

.efk-summary-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden;
  table-layout:fixed;
}
.efk-summary-table th,.efk-summary-table td{
  padding:12px 14px;
  font-size:14px;
  vertical-align:top;
  word-break:break-word;
}
.efk-summary-table th{text-align:left;font-weight:900;background:#fff;color:var(--efk-text);}
.efk-summary-table td{text-align:right;font-weight:900;color:var(--efk-text);}
.efk-summary-table tr + tr th,
.efk-summary-table tr + tr td{border-top:1px solid rgba(0,0,0,.06);}

.efk-table-wrap{
  margin-top:16px;
  overflow:auto;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:#fff;
  display:none;
}
.efk-table-wrap[data-open="true"]{display:block;}

table.efk-table{width:100%;border-collapse:collapse;min-width:880px;}
.efk-table th,.efk-table td{
  padding:10px 10px;
  font-size:12px;
  text-align:right;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.efk-table th:first-child,.efk-table td:first-child{text-align:left;}
.efk-table th{background:#f3f6fb;font-weight:900;position:sticky;top:0;}
.efk-table tbody tr:nth-child(even){background:#fbfcff;}
.efk-table tfoot td{background:#f3f6fb;font-weight:900;}

/* 4 kolumny (nadpłaty/refi) */
.efk-compare-4{table-layout:fixed;}
.efk-compare-4 col:first-child{width:34%;}
.efk-compare-4 col:nth-child(2),
.efk-compare-4 col:nth-child(3),
.efk-compare-4 col:nth-child(4){width:22%;}

/* 3 kolumny (porównanie 2 kredytów) */
.efk-compare-3{table-layout:fixed;}
.efk-compare-3 col:first-child{width:42%;}
.efk-compare-3 col:nth-child(2),
.efk-compare-3 col:nth-child(3){width:29%;}

/* przyciski w komórkach tabeli */
.efk-cell-btn{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.efk-cell-btn:hover{background:rgba(0,0,0,.02);}

.efk-inline-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
@media (max-width:760px){
  .efk-inline-actions{justify-content:flex-start;}
  .efk-inline-actions .efk-cell-btn{width:auto;}
}

/* ---------- jeden kalkulator na stronę ---------- */
.efk-suite--single{margin:8px auto 24px;max-width:1000px;}
.efk-suite.efk-suite--single .efk-layout{grid-template-columns:1fr !important;} /* !important: nadpisuje regułę z CSS Personalizacji */
.efk-suite--single .efk-panel{display:block;}

/* liczby w polach bez spinnerów – mniej przypadkowych kliknięć na telefonie */
.efk-field input[type="number"]{-moz-appearance:textfield;}
.efk-field input[type="number"]::-webkit-outer-spin-button,
.efk-field input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}

/* fokus z klawiatury */
.efk-actions button:focus-visible,.efk-nav button:focus-visible,.efk-cell-btn:focus-visible{
  outline:3px solid rgba(0,55,133,.35);outline-offset:2px;
}
