/* Kändude freesimise hinnakalkulaator — skoobitud #afk-calc alla (teema-CSS-i ei mõjuta). */
#afk-calc {
  --forest: #34503B;
  --forest-d: #263c2c;
  --ochre: #B5771D;
  --ochre-d: #97621528;
  --soil: #6F5138;
  --bg: #F5F1E9;
  --bg-card: #ffffff;
  --line: #e2dccf;
  --ink: #2b2b26;
  --muted: #6f6a5e;
  --ok: #34503B;
  --shadow: 0 1px 2px rgba(43,43,38,.06), 0 6px 20px rgba(43,43,38,.06);
  --radius: 12px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  padding: 4px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
#afk-calc * { box-sizing: border-box; }

#afk-calc .afk-shell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Header */
#afk-calc .afk-head {
  background: var(--forest);
  color: #fff;
  padding: 20px 22px;
}
#afk-calc .afk-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#afk-calc .afk-head p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #d9e2d8;
}

#afk-calc .afk-body { padding: 22px; }
@media (max-width: 480px){ #afk-calc .afk-body { padding: 16px; } }

#afk-calc .afk-step-label {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--soil);
  margin: 0 0 10px;
}
#afk-calc .afk-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--forest); color: #fff; font-size: 12px;
}

/* Add-stump row */
#afk-calc .afk-add {
  display: flex; gap: 10px; align-items: stretch;
}
#afk-calc .afk-add .afk-field { flex: 1; }
#afk-calc label.afk-lab {
  display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px;
}
#afk-calc .afk-input-wrap { position: relative; }
#afk-calc input[type="number"], #afk-calc input[type="text"],
#afk-calc input[type="tel"], #afk-calc input[type="email"], #afk-calc textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px avoids iOS zoom */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
#afk-calc .afk-input-wrap .afk-unit {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
#afk-calc .afk-input-wrap input { padding-right: 13px; }
#afk-calc input:focus, #afk-calc textarea:focus {
  outline: none; border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(52,80,59,.14);
}

#afk-calc button { font: inherit; cursor: pointer; border: none; }
#afk-calc .afk-btn-add {
  background: var(--forest); color: #fff;
  border-radius: 9px; padding: 0 18px; font-weight: 600; font-size: 15px;
  white-space: nowrap; align-self: flex-end; height: 46px;
  transition: background .15s;
}
#afk-calc .afk-btn-add:hover { background: var(--forest-d); }
#afk-calc .afk-btn-add:disabled { opacity: .4; cursor: not-allowed; }

#afk-calc .afk-hint { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; }

/* Stump list */
#afk-calc .afk-list { list-style: none; margin: 16px 0 0; padding: 0; }
#afk-calc .afk-list li {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; margin-bottom: 8px;
  animation: afk-in .18s ease;
}
@keyframes afk-in { from { opacity: 0; transform: translateY(-4px);} to {opacity:1;transform:none;} }
@media (prefers-reduced-motion: reduce){ #afk-calc .afk-list li { animation: none; } }
#afk-calc .afk-list .afk-idx {
  width: 26px; height: 26px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 50%;
  font-size: 13px; font-weight: 700; color: var(--soil);
}
#afk-calc .afk-list .afk-dia { font-weight: 600; }
#afk-calc .afk-list .afk-dia small { font-weight: 400; color: var(--muted); }
#afk-calc .afk-list .afk-line { margin-left: auto; color: var(--muted); font-size: 14px; }
#afk-calc .afk-list .afk-rm {
  background: none; color: var(--muted); font-size: 20px; line-height: 1;
  padding: 2px 6px; border-radius: 6px;
}
#afk-calc .afk-list .afk-rm:hover { color: #a33; background: #fbeaea; }

#afk-calc .afk-empty {
  margin: 16px 0 0; padding: 18px; text-align: center;
  border: 1px dashed var(--line); border-radius: 9px;
  color: var(--muted); font-size: 14px; background: #fff;
}

/* Debris toggle */
#afk-calc .afk-toggle {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 13px 15px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer;
}
#afk-calc .afk-toggle .afk-sw {
  width: 44px; height: 26px; border-radius: 999px; background: #cfc8b8;
  position: relative; flex: none; transition: background .18s;
}
#afk-calc .afk-toggle .afk-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s;
}
#afk-calc .afk-toggle.on .afk-sw { background: var(--ochre); }
#afk-calc .afk-toggle.on .afk-sw::after { transform: translateX(18px); }
#afk-calc .afk-toggle .afk-tt { flex: 1; }
#afk-calc .afk-toggle .afk-tt strong { display: block; font-size: 15px; }
#afk-calc .afk-toggle .afk-tt span { font-size: 13px; color: var(--muted); }
#afk-calc .afk-choice { display: flex; align-items: center; gap: 10px; flex: none; }
#afk-calc .afk-choice span { font-size: 14px; font-weight: 700; color: #c2bbab; transition: color .15s; }
#afk-calc .afk-toggle:not(.on) .afk-no { color: var(--soil); }
#afk-calc .afk-toggle.on .afk-yes { color: var(--ochre); }

/* Price panel */
#afk-calc .afk-price {
  margin-top: 20px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
#afk-calc .afk-price-rows { background: #fff; padding: 16px 18px; }
#afk-calc .afk-prow {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14.5px; padding: 4px 0; color: var(--muted);
}
#afk-calc .afk-prow b { color: var(--ink); font-weight: 600; }
#afk-calc .afk-total {
  background: var(--forest); color: #fff;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 15px 18px;
}
#afk-calc .afk-total .afk-tl { font-size: 14px; color: #d9e2d8; }
#afk-calc .afk-total .afk-tv { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
#afk-calc .afk-tariff-note, #afk-calc .afk-min-note {
  font-size: 12.5px; color: var(--muted); margin: 8px 2px 0;
}
#afk-calc .afk-min-note { color: var(--ochre); font-weight: 600; }

#afk-calc .afk-indic {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 14px; padding: 12px 14px;
  background: var(--ochre-d); border-radius: 9px;
  font-size: 13px; color: var(--soil); line-height: 1.45;
}
#afk-calc .afk-indic svg { flex: none; margin-top: 1px; }

/* Divider */
#afk-calc .afk-div {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0 22px; color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
#afk-calc .afk-div::before, #afk-calc .afk-div::after {
  content: ""; height: 1px; background: var(--line); flex: 1;
}

/* Form grid */
#afk-calc .afk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 0.75rem; }
@media (max-width: 480px){ #afk-calc .afk-grid { grid-template-columns: 1fr; } }
#afk-calc .afk-grid .afk-full { grid-column: 1 / -1; }
#afk-calc textarea { min-height: 84px; resize: vertical; }

/* Floating-label fields — täpselt sama muster kui /kontakt/ "Saada päring" vormil */
#afk-calc .afk-float { position: relative; }
#afk-calc .afk-float label {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  padding: 0 5px; background: #fff;
  color: var(--muted); font-size: 16px; pointer-events: none;
  transition: top .15s ease, font-size .15s ease, color .15s ease;
}
#afk-calc .afk-float--textarea label { top: 20px; transform: none; }
#afk-calc .afk-float input:focus + label,
#afk-calc .afk-float input:not(:placeholder-shown) + label,
#afk-calc .afk-float textarea:focus + label,
#afk-calc .afk-float textarea:not(:placeholder-shown) + label {
  top: 0; transform: translateY(-50%); font-size: 0.72rem; color: var(--forest);
}
#afk-calc .afk-float--textarea textarea:focus + label,
#afk-calc .afk-float--textarea textarea:not(:placeholder-shown) + label {
  transform: translateY(-50%);
}

/* Photo upload — sama muster kui /kontakt/: roheline "Vali failid" nupp */
#afk-calc .afk-pick {
  margin-top: 2px; background: var(--forest); color: #fff;
  font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 8px;
  transition: background .15s;
}
#afk-calc .afk-pick:hover { background: var(--forest-d); }
#afk-calc .afk-pick-status { margin-left: 12px; color: var(--muted); font-size: 14px; }
#afk-calc .afk-pick-note { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.45; }
#afk-calc .afk-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#afk-calc .afk-thumb {
  position: relative; width: 68px; height: 68px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--line);
}
#afk-calc .afk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#afk-calc .afk-thumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
  font-size: 13px; line-height: 20px; padding: 0; text-align: center;
}
#afk-calc .afk-thumb .afk-sz {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 9.5px;
  text-align: center; padding: 1px 0;
}

/* Honeypot — nähtamatu inimesele, botid täidavad */
#afk-calc .afk-hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* Send */
#afk-calc .afk-send {
  width: 100%; margin-top: 18px;
  background: var(--ochre); color: #fff;
  font-size: 17px; font-weight: 700; padding: 15px;
  border-radius: 10px; transition: background .15s, transform .05s;
}
#afk-calc .afk-send:hover { background: #9c6516; }
#afk-calc .afk-send:active { transform: translateY(1px); }
#afk-calc .afk-send:disabled { opacity: .5; cursor: not-allowed; }
#afk-calc .afk-expect {
  margin: 12px 2px 0; font-size: 13px; color: var(--muted);
  text-align: center; line-height: 1.5;
}
#afk-calc .afk-err {
  display: none; margin-top: 10px; padding: 10px 12px;
  background: #fbeaea; border: 1px solid #eccaca; border-radius: 8px;
  color: #8a2a2a; font-size: 13.5px;
}

/* Confirmation */
#afk-calc .afk-done { display: none; padding: 6px; }
#afk-calc .afk-done.show { display: block; animation: afk-in .25s ease; }
#afk-calc .afk-done-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
#afk-calc .afk-done-head {
  background: var(--forest); color: #fff; padding: 20px 22px;
  display: flex; align-items: center; gap: 12px;
}
#afk-calc .afk-done-head h3 { margin: 0; font-size: 18px; }
#afk-calc .afk-done-head .afk-check {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center;
}
#afk-calc .afk-done-body { padding: 20px 22px; }
#afk-calc .afk-done-body > p { margin-top: 0; font-size: 14.5px; color: var(--muted); }
#afk-calc .afk-payload {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 14px 16px; font-size: 13.5px; white-space: pre-wrap;
  color: var(--ink); margin: 14px 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  line-height: 1.6;
}
#afk-calc .afk-again {
  background: none; color: var(--forest); text-decoration: underline;
  font-size: 14px; padding: 4px;
}
