/* Pricing wizard of kontrola-zmluvy.sk - /zistit-cenu-kontroly (docs/kontrola-ceny.md).
   Taken over from the prototype of the handover package; every class carries the kc- prefix so
   nothing collides with Bootstrap of the websites (.btn-primary, .input, .toast, ...). The font
   is the one of the website - the prototype loaded Open Sans from Google, the page does not. */

.kc {
  --kc-navy: #16356d;
  --kc-navy-dark: #102a57;
  --kc-link: #1a5dab;
  --kc-green: #28a745;
  --kc-green-dark: #1f8c38;
  --kc-red: #d9534f;
  --kc-red-dark: #c0392b;
  --kc-text: #333a45;
  --kc-muted: #6b7686;
  --kc-border: #dfe5ec;
  --kc-bg-soft: #f5f7fa;
  --kc-shadow: 0 1px 3px rgba(22, 53, 109, .08), 0 4px 14px rgba(22, 53, 109, .07);
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 0 40px;
  color: var(--kc-text);
  font-size: 15px;
  line-height: 1.65;
}
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc button, .kc input, .kc select, .kc textarea { font-family: inherit; }

/* ---------- Stepper ---------- */
.kc-stepper { display: flex; align-items: flex-start; margin: 0 0 26px; padding: 0; list-style: none; }
.kc-stepper li { flex: 1; text-align: center; position: relative; min-width: 0; }
.kc-stepper li::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--kc-border); z-index: 0;
}
.kc-stepper li:first-child::before { display: none; }
.kc-stepper li.done::before, .kc-stepper li.active::before { background: var(--kc-green); }
.kc-stepper li.done { cursor: pointer; }
.kc-stepper li.done:hover .kc-step-dot { transform: scale(1.12); box-shadow: 0 2px 8px rgba(40, 167, 69, .4); }
.kc-stepper li.done:hover .kc-step-label { text-decoration: underline; }
.kc-step-dot {
  width: 32px; height: 32px; border-radius: 50%; background: #fff;
  border: 2px solid #c4cedb; color: #7d8aa0; font-size: 13px; font-weight: 700;
  display: grid; place-items: center; margin: 0 auto; position: relative; z-index: 1;
  transition: transform .12s, box-shadow .12s;
}
.kc-stepper li.active .kc-step-dot { border-color: var(--kc-navy); background: var(--kc-navy); color: #fff; }
.kc-stepper li.done .kc-step-dot { border-color: var(--kc-green); background: var(--kc-green); color: #fff; }
.kc-step-label { display: block; font-size: 11px; font-weight: 700; color: #8a96a8; margin-top: 6px; line-height: 1.25; }
.kc-stepper li.active .kc-step-label { color: var(--kc-navy); }
.kc-stepper li.done .kc-step-label { color: var(--kc-green-dark); }
.kc-step-now { display: none; font-size: 13px; font-weight: 700; color: var(--kc-navy); margin: -16px 0 20px; text-align: center; }
@media (max-width: 700px) {
  .kc-step-label { display: none; }
  .kc-step-dot { width: 26px; height: 26px; font-size: 11.5px; }
  .kc-stepper li::before { top: 12px; }
  .kc-step-now { display: block; }
}

/* ---------- Step cards ---------- */
.kc-step {
  background: #fff; border: 1px solid var(--kc-border); border-radius: 10px;
  box-shadow: var(--kc-shadow); padding: 28px; display: none;
}
.kc-step.visible { display: block; }
.kc-step h2 { margin: 0 0 6px; color: #182b49; font-size: 22px; font-weight: 800; }
.kc-step-sub { margin: 0 0 20px; color: var(--kc-muted); font-size: 14px; }
@media (max-width: 700px) { .kc-step { padding: 20px 16px; } }

.kc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.kc-btn-back {
  background: none; border: none; color: var(--kc-muted); font-weight: 600; font-size: 14px;
  cursor: pointer; padding: 10px 6px; touch-action: manipulation;
}
.kc-btn-back:hover { color: var(--kc-navy); }
.kc-btn {
  background: var(--kc-green); color: #fff; border: none; border-radius: 8px;
  font-weight: 700; font-size: 15.5px; padding: 13px 28px; cursor: pointer;
  transition: background .15s, opacity .15s; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.kc-btn:hover:not(:disabled) { background: var(--kc-green-dark); }
.kc-btn:disabled { opacity: .45; cursor: not-allowed; }
.kc-btn svg { width: 19px; height: 19px; }
.kc-btn-secondary {
  background: #fff; color: var(--kc-navy); border: 1.5px solid #c4cedb; border-radius: 8px;
  font-weight: 700; font-size: 14px; padding: 11px 20px; cursor: pointer; touch-action: manipulation;
}
.kc-btn-secondary:hover { border-color: var(--kc-navy); }
.kc-linklike {
  background: none; border: none; color: var(--kc-link); font-weight: 600; font-size: 13.5px;
  cursor: pointer; padding: 4px; touch-action: manipulation;
}
.kc-linklike:hover { text-decoration: underline; }

/* ---------- Step 1: consent ---------- */
.kc-consent {
  background: var(--kc-bg-soft); border: 1px solid var(--kc-border); border-radius: 8px;
  padding: 18px 20px; font-size: 14.5px; color: #2c3a52; margin-bottom: 20px;
}
.kc-question { font-weight: 700; color: #182b49; margin: 0 0 10px; }
.kc-yn { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kc-yn button {
  min-width: 110px; padding: 12px 26px; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 15px; background: #fff; transition: all .12s; touch-action: manipulation;
}
.kc-yn .yes { border: 2px solid var(--kc-green); color: var(--kc-green-dark); }
.kc-yn .yes.selected { background: var(--kc-green); color: #fff; box-shadow: 0 2px 8px rgba(40, 167, 69, .35); }
.kc-yn .no { border: 2px solid #e3b3b1; color: var(--kc-red-dark); }
.kc-yn .no.selected { background: #faedec; border-color: var(--kc-red); color: var(--kc-red-dark); }
.kc-hint { font-size: 13px; color: var(--kc-red-dark); margin-top: 12px; }
.kc-hint.ok { color: var(--kc-green-dark); }

.kc-privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .kc-privacy { grid-template-columns: 1fr; } }
.kc-privacy label {
  display: flex; gap: 11px; align-items: flex-start; border: 1.5px solid #c4cedb;
  border-radius: 8px; padding: 14px 16px; cursor: pointer; background: #fff;
  transition: border-color .12s, background .12s; margin: 0;
}
.kc-privacy label:hover { border-color: #9cc0e0; }
.kc-privacy label:has(input:checked) { border-color: var(--kc-navy); background: #eef3fa; }
.kc-privacy input { accent-color: var(--kc-navy); margin-top: 3px; flex: none; width: 16px; height: 16px; }
.kc-privacy-text { display: flex; flex-direction: column; gap: 3px; }
.kc-privacy-title { font-weight: 700; font-size: 14px; color: #182b49; line-height: 1.35; }
.kc-privacy-desc { font-size: 12.5px; color: var(--kc-muted); line-height: 1.5; }

/* ---------- Step 2: upload ---------- */
.kc-dropzone {
  border: 2px dashed #aebfd4; border-radius: 10px; background: #f8fafc;
  padding: 34px 20px; text-align: center; cursor: pointer; transition: all .15s;
}
.kc-dropzone:hover, .kc-dropzone.drag { border-color: var(--kc-green); background: #f1faf3; }
.kc-dropzone svg { width: 40px; height: 40px; margin-bottom: 8px; }
.kc-dz-title { font-weight: 700; color: #182b49; font-size: 15.5px; }
.kc-dz-sub { font-size: 13px; color: var(--kc-muted); margin: 4px 0 14px; }
.kc-files { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kc-files li {
  display: flex; align-items: center; gap: 10px; background: #f1faf3;
  border: 1px solid #b9e2c3; border-radius: 8px; padding: 9px 12px; font-size: 13.5px;
}
.kc-file-check {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--kc-green);
  display: grid; place-items: center;
}
.kc-file-name { font-weight: 600; color: #1c2a3f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-file-size { color: var(--kc-muted); flex: none; font-size: 12.5px; }
.kc-file-remove {
  margin-left: auto; flex: none; background: none; border: none; color: #b0bac8;
  cursor: pointer; font-size: 17px; line-height: 1; padding: 6px 10px; border-radius: 4px; touch-action: manipulation;
}
.kc-file-remove:hover { color: var(--kc-red); background: #fdf0ef; }
.kc-upload-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--kc-muted); margin-top: 8px; flex-wrap: wrap; }
.kc-error { color: var(--kc-red-dark); font-size: 13px; font-weight: 600; margin: 8px 0 0; min-height: 0; }
.kc-error:empty { display: none; }

.kc-label { display: block; font-weight: 700; color: #182b49; font-size: 14px; margin: 22px 0 6px; }
.kc-help { font-size: 12.5px; color: var(--kc-muted); margin: 0 0 8px; }
.kc-input {
  width: 100%; border: 1px solid #c4cedb; border-radius: 8px; padding: 11px 13px;
  font-size: 14.5px; color: var(--kc-text); background: #fff;
}
textarea.kc-input { min-height: 92px; resize: vertical; }
.kc-input:focus { outline: 2px solid #9cc0e0; outline-offset: -1px; }
@media (pointer: coarse) { .kc-input { font-size: 16px; } }

/* ---------- Step 3: analysis ---------- */
.kc-analysis { text-align: center; padding: 18px 0 8px; }
.kc-ring { position: relative; width: 168px; height: 168px; margin: 0 auto 18px; }
.kc-ring svg { transform: rotate(-90deg); }
.kc-ring-bg { stroke: #e6ecf3; }
.kc-ring-fg { stroke: var(--kc-green); transition: stroke-dashoffset .3s linear; stroke-linecap: round; }
.kc-ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #182b49; }
.kc-analysis-msg { font-size: 15px; font-weight: 600; color: var(--kc-navy); min-height: 24px; }
.kc-analysis-note { font-size: 12.5px; color: var(--kc-muted); margin-top: 16px; }

/* ---------- Step 4: selection of the documents ---------- */
.kc-intro {
  background: #f1faf3; border: 1px solid #cdead4; border-radius: 8px;
  padding: 14px 16px; font-size: 14px; color: #1d4220; margin-bottom: 8px;
}
.kc-intro.lawyer { background: #fdf8ec; border-color: #f0dfb0; color: #5b4510; }
.kc-documents { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.kc-document {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  border: 1.5px solid var(--kc-border); border-radius: 11px; padding: 15px 16px; margin: 0;
  background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
label.kc-document { cursor: pointer; }
label.kc-document:hover { border-color: #9cc0e0; box-shadow: 0 3px 12px rgba(22, 53, 109, .07); }
.kc-document.selected { border-color: #83c994; background: #f4fbf6; }
.kc-document.supporting { background: #f8fafc; color: var(--kc-muted); }
.kc-document > input { width: 21px; height: 21px; margin: 0; accent-color: var(--kc-green); cursor: pointer; flex: none; }
.kc-document-icon {
  width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  background: #e6edf6; color: var(--kc-navy); font-size: 12px; font-weight: 800;
}
.kc-document-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.kc-document-info strong { color: #182b49; font-size: 14px; overflow-wrap: anywhere; }
.kc-document-type { color: #51607a; font-size: 12.5px; line-height: 1.4; }
.kc-document-action { color: var(--kc-green-dark); font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.kc-document:not(.selected) .kc-document-action { color: var(--kc-muted); }
.kc-document-price { min-width: 116px; text-align: right; color: var(--kc-muted); font-size: 12px; }
.kc-document-price small { display: block; font-size: 10.5px; color: var(--kc-muted); margin-bottom: 2px; }
.kc-document-price strong { display: block; color: var(--kc-navy); font-size: 20px; font-weight: 800; white-space: nowrap; }
.kc-total {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 16px; padding: 16px 18px; border-radius: 10px; background: var(--kc-navy); color: #fff;
}
.kc-total span { font-size: 14px; font-weight: 700; }
.kc-total strong { font-size: 27px; font-weight: 800; white-space: nowrap; }
.kc-total strong.lawyer { font-size: 16px; }
.kc-busy { opacity: .55; pointer-events: none; transition: opacity .15s; }
.kc-note { font-size: 12px; color: var(--kc-muted); margin-top: 16px; }
@media (max-width: 600px) {
  .kc-document { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px 12px; padding: 13px; }
  .kc-document-price { grid-column: 2; min-width: 0; text-align: left; padding-top: 4px; }
  .kc-document-price small { display: inline; margin-right: 6px; }
  .kc-document-price strong { display: inline; font-size: 18px; }
  .kc-total { padding: 14px 15px; }
  .kc-total strong { font-size: 23px; }
}

/* ---------- Step 5: order form ---------- */
.kc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.kc-form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .kc-form { grid-template-columns: 1fr; } }
.kc-field label { display: block; font-size: 13px; font-weight: 700; color: #182b49; margin-bottom: 5px; }
.kc-req { color: var(--kc-red); }
.kc-field-error { display: none; font-size: 12px; color: var(--kc-red-dark); font-weight: 600; margin-top: 4px; }
.kc-field.error .kc-field-error { display: block; }
.kc-field.error .kc-input { border-color: var(--kc-red); }
.kc-persontype { display: flex; gap: 10px; margin: 4px 0 18px; flex-wrap: wrap; }
.kc-persontype label {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid #c4cedb; margin: 0;
  border-radius: 8px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.kc-persontype label:has(input:checked) { border-color: var(--kc-navy); background: #eef3fa; color: var(--kc-navy); }
.kc-company { display: none; }
.kc-company.visible { display: contents; }
.kc-summary {
  background: var(--kc-bg-soft); border: 1px solid var(--kc-border); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 20px; font-size: 14px;
}
.kc-summary-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kc-summary strong { color: #182b49; }
.kc-summary-price { font-size: 21px; font-weight: 800; color: var(--kc-navy); white-space: nowrap; }
.kc-summary-lines { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed #c9d3e0; display: flex; flex-direction: column; gap: 5px; }
.kc-summary-lines:empty { display: none; }
.kc-summary-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--kc-muted); }
.kc-summary-lines li span:first-child { overflow-wrap: anywhere; }
.kc-summary-lines li span:last-child { font-weight: 700; color: #2c3a52; white-space: nowrap; }
.kc-summary .kc-linklike { margin-top: 12px; display: inline-block; font-size: 12.5px; }

/* ---------- Step 6: check of the e-mail ---------- */
.kc-confirm { text-align: center; padding: 8px 0 4px; }
.kc-mail-icon { width: 52px; height: 52px; margin-bottom: 12px; }
.kc-confirm-lead { font-size: 16.5px; font-weight: 800; color: #182b49; margin: 0 0 16px; }
.kc-email {
  display: inline-block; background: var(--kc-bg-soft); border: 1.5px solid var(--kc-border);
  border-radius: 10px; padding: 15px 26px; font-size: 22px; font-weight: 800;
  color: var(--kc-navy); word-break: break-all; max-width: 100%; line-height: 1.3;
}
.kc-confirm-hint { font-size: 13px; color: var(--kc-muted); max-width: 470px; margin: 16px auto 22px; line-height: 1.6; }
.kc-confirm-hint em { font-style: normal; font-weight: 700; color: var(--kc-red-dark); background: #faedec; padding: 1px 6px; border-radius: 4px; }
.kc-confirm-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.kc-email-edit { display: flex; gap: 10px; max-width: 480px; margin: 4px auto 0; }
.kc-email-edit .kc-input { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.kc-email-editor .kc-label { text-align: center; margin-bottom: 10px; }
.kc-email-editor .kc-linklike { display: block; margin: 6px auto 0; }
@media (max-width: 560px) {
  .kc-email-edit { flex-direction: column; }
  .kc-email { font-size: 19px; padding: 13px 18px; }
}

/* ---------- Step 7: order / payment ---------- */
.kc-pay-summary {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--kc-navy); color: #fff; border-radius: 10px; padding: 16px 20px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.kc-pay-name { font-weight: 700; font-size: 15.5px; }
.kc-pay-term { font-size: 12.5px; color: #b9cbe8; }
.kc-pay-price { font-size: 26px; font-weight: 800; }
.kc-pay-cta { text-align: center; margin-top: 20px; }
.kc-pay-cta .kc-btn { min-width: 260px; font-size: 16.5px; }
.kc-pay-note { font-size: 12px; color: var(--kc-muted); margin-top: 10px; }

.kc-done { text-align: center; padding: 22px 0 8px; }
.kc-done h3 { margin: 0 0 8px; color: #182b49; font-size: 22px; font-weight: 800; }
.kc-done p { color: #2c3a52; font-size: 14.5px; max-width: 520px; margin: 0 auto 8px; }
.kc-done.failed h3 { color: var(--kc-red-dark); }
.kc-big-check {
  width: 88px; height: 88px; border-radius: 50%; background: var(--kc-green);
  display: grid; place-items: center; margin: 0 auto 18px;
  box-shadow: 0 8px 22px rgba(40, 167, 69, .42);
  animation: kc-pop .45s cubic-bezier(.18, .89, .32, 1.28) both;
}
.kc-big-check svg { width: 48px; height: 48px; stroke-dasharray: 42; stroke-dashoffset: 42; animation: kc-draw .5s .24s ease forwards; }
.kc-done.failed .kc-big-check { background: #e0a43a; box-shadow: none; }
@keyframes kc-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes kc-draw { to { stroke-dashoffset: 0; } }

.kc-spinner {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  border: 5px solid #e6ecf3; border-top-color: var(--kc-green); animation: kc-spin .9s linear infinite;
}
@keyframes kc-spin { to { transform: rotate(360deg); } }

.kc-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #182b49; color: #fff; font-weight: 600; font-size: 13.5px;
  padding: 11px 20px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 1080; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: calc(100% - 32px);
}
.kc-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .kc-big-check { animation: none; }
  .kc-big-check svg { animation: none; stroke-dashoffset: 0; }
  .kc-spinner { animation-duration: 3s; }
}

@media (max-width: 600px) {
  .kc-nav { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .kc-nav .kc-btn { width: 100%; padding: 14px 20px; }
  .kc-nav .kc-btn-back { width: 100%; text-align: center; padding: 12px 6px; }
  .kc-yn button { flex: 1; min-width: 0; padding: 13px 14px; }
  .kc-pay-cta .kc-btn { width: 100%; min-width: 0; }
  .kc-pay-summary { padding: 14px 16px; }
  .kc-pay-price { font-size: 23px; }
}
