/*!
 * tf-modal.css — modal „Turbofaktúra končí“
 * Bez závislostí. Všetko je pod prefixom .tfm-, nič neprepisuje globálne štýly.
 */

.tfm-root {
  --tfm-primary: #2fa4e7;
  --tfm-primary-dark: #178acc;
  --tfm-navy: #033c73;
  --tfm-navy-deep: #022f5a;
  --tfm-ink: #24313f;
  --tfm-muted: #5b6b7c;
  --tfm-line: #dfe6ee;
  --tfm-tint: #f2f8fd;
  --tfm-radius: 14px;
  --tfm-speed: 200ms;

  position: fixed;
  inset: 0;
  z-index: 2147483000; /* nad Bootstrap modalmi (1050) aj nad chat widgetom */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tfm-ink);
  -webkit-font-smoothing: antialiased;
}

.tfm-root[hidden] { display: none; }

/* ---------- backdrop ---------- */

.tfm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 60, 115, 0.62);
  opacity: 0;
  transition: opacity var(--tfm-speed) ease;
}

.tfm-root--open .tfm-backdrop { opacity: 1; }

/* ---------- dialóg ---------- */

.tfm-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: var(--tfm-radius);
  box-shadow: 0 24px 60px rgba(2, 25, 48, 0.38);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity var(--tfm-speed) ease, transform var(--tfm-speed) ease;
}

.tfm-root--open .tfm-dialog {
  opacity: 1;
  transform: none;
}

.tfm-dialog:focus { outline: none; }

/* ---------- zatváracie X ---------- */

.tfm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background var(--tfm-speed) ease;
}

.tfm-close:hover { background: rgba(255, 255, 255, 0.3); }
.tfm-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- hlavička ---------- */

.tfm-head {
  padding: 26px 58px 24px 30px;
  background: linear-gradient(135deg, var(--tfm-navy-deep) 0%, var(--tfm-navy) 45%, #0a5ca8 100%);
  color: #fff;
}

.tfm-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.2;
}

.tfm-title {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.tfm-nowrap { white-space: nowrap; }

/* ---------- telo ---------- */

.tfm-body {
  padding: 24px 30px 4px;
  overflow-y: auto;
}

.tfm-lead {
  margin: 0 0 18px;
  color: var(--tfm-muted);
}

.tfm-lead strong { color: var(--tfm-ink); }

.tfm-points {
  margin: 0;
  padding: 16px 18px;
  list-style: none;
  background: var(--tfm-tint);
  border: 1px solid var(--tfm-line);
  border-radius: 10px;
}

.tfm-point {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.5px;
}

.tfm-point + .tfm-point {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(3, 60, 115, 0.09);
}

.tfm-ico {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--tfm-primary);
}

.tfm-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--tfm-muted);
}

/* ---------- pätička ---------- */

.tfm-foot {
  padding: 20px 30px 24px;
}

.tfm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tfm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--tfm-speed) ease, border-color var(--tfm-speed) ease, color var(--tfm-speed) ease;
}

.tfm-btn:focus-visible {
  outline: 2px solid var(--tfm-navy);
  outline-offset: 2px;
}

.tfm-btn--primary {
  background: var(--tfm-primary);
  color: #fff;
}

.tfm-btn--primary:hover,
.tfm-btn--primary:focus {
  background: var(--tfm-primary-dark);
  color: #fff;
  text-decoration: none;
}

.tfm-btn--secondary {
  background: #fff;
  border-color: var(--tfm-line);
  color: var(--tfm-navy);
}

.tfm-btn--secondary:hover,
.tfm-btn--secondary:focus {
  border-color: var(--tfm-primary);
  color: var(--tfm-navy);
  background: var(--tfm-tint);
  text-decoration: none;
}

.tfm-btn--ghost {
  margin-left: auto;
  background: transparent;
  color: var(--tfm-muted);
  font-weight: 600;
}

.tfm-btn--ghost:hover { color: var(--tfm-ink); }

/* ---------- „Už nezobrazovať“ ---------- */

.tfm-optout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--tfm-muted);
  cursor: pointer;
  user-select: none;
}

.tfm-optout input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--tfm-primary);
  cursor: pointer;
}

/* ---------- scroll lock na stránke pod modalom ---------- */

.tfm-scroll-lock { overflow: hidden !important; }

/* ---------- mobil: full-screen sheet ---------- */

@media (max-width: 600px) {
  .tfm-root { padding: 0; align-items: flex-end; }

  .tfm-dialog {
    max-width: none;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    transform: translateY(24px);
  }

  .tfm-head { padding: 22px 52px 20px 20px; }
  .tfm-title { font-size: 21px; }
  .tfm-body { padding: 20px 20px 4px; }
  .tfm-foot { padding: 18px 20px 22px; }

  .tfm-actions { flex-direction: column; }
  .tfm-btn { width: 100%; }
  .tfm-btn--ghost { margin-left: 0; }
  .tfm-optout { justify-content: center; }
}

/* ---------- prístupnosť: obmedzený pohyb ---------- */

@media (prefers-reduced-motion: reduce) {
  .tfm-backdrop,
  .tfm-dialog,
  .tfm-btn,
  .tfm-close {
    transition: none !important;
  }
  .tfm-dialog { transform: none !important; }
}
