/* =========================================================
   Fleet Tracer web - Brza pomoć
   Izolirani stilovi: svi selektori koriste ft-help prefiks.
   ========================================================= */

.ft-help-launcher {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1025;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px 10px 12px;
  border: 1px solid rgba(0, 75, 141, 0.24);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(255, 255, 255, 0.97);
  color: #003366;
  font-family: "Google Sans", "Google Sans Text", Roboto, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    0 10px 28px rgba(0, 40, 90, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(7px);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ft-help-launcher:hover,
.ft-help-launcher:focus-visible {
  border-color: rgba(0, 75, 141, 0.38);
  background: #eef6ff;
  box-shadow:
    0 14px 34px rgba(0, 40, 90, 0.24),
    0 0 0 1px rgba(13, 110, 253, 0.08);
  outline: none;
  transform: translateY(-50%) translateX(-2px);
}

.ft-help-launcher__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00549c;
  color: #ffffff;
  font-size: 0.82rem;
  box-shadow: 0 3px 8px rgba(0, 64, 123, 0.18);
}

/* Jednokratno, nenametljivo naglašavanje pri prvom dolasku u kartici preglednika. */
.ft-help-launcher--attention {
  animation: ftHelpLauncherAttention 1.35s ease-out 0.35s 1 both;
}

@keyframes ftHelpLauncherAttention {
  0%, 100% {
    box-shadow:
      0 10px 28px rgba(0, 40, 90, 0.18),
      0 0 0 0 rgba(13, 110, 253, 0);
  }
  42% {
    box-shadow:
      0 14px 34px rgba(0, 40, 90, 0.24),
      0 0 0 8px rgba(13, 110, 253, 0.13);
  }
}

.ft-help-panel.offcanvas {
  width: min(420px, 100vw);
  border-left: 1px solid rgba(0, 64, 123, 0.12);
  background: #f7fafe;
  color: #25364a;
  font-family: "Google Sans", "Google Sans Text", Roboto, sans-serif;
  box-shadow: -18px 0 50px rgba(0, 40, 90, 0.18);
}

.ft-help-panel .offcanvas-header {
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 64, 123, 0.1);
  background: #fff;
}

.ft-help-panel__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ft-help-panel__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #eef6ff;
  color: #00407b;
  font-size: 1rem;
}

.ft-help-panel .offcanvas-title {
  margin: 0;
  color: #003366;
  font-size: 1.12rem;
  font-weight: 800;
}

.ft-help-panel .btn-close {
  box-shadow: none;
}

.ft-help-panel .offcanvas-body {
  padding: 0;
  overflow-y: auto;
}

.ft-help-view {
  padding: 18px 16px 28px;
}

.ft-help-intro {
  margin: 0 0 12px;
  color: #003366;
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ft-help-search {
  position: relative;
  margin-bottom: 20px;
}

.ft-help-search__icon {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #5d6f84;
  transform: translateY(-50%);
  pointer-events: none;
}

.ft-help-search__input {
  width: 100%;
  height: 48px;
  padding: 10px 42px 10px 42px;
  border: 1px solid rgba(0, 64, 123, 0.16);
  border-radius: 14px;
  background: #fff;
  color: #25364a;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 40, 90, 0.04);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft-help-search__input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

/* Brza pomoć koristi vlastiti X za brisanje. Sakrij eventualni native X preglednika. */
.ft-help-search__input::-webkit-search-cancel-button,
.ft-help-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.ft-help-search__clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6c7c90;
  transform: translateY(-50%);
  cursor: pointer;
}

.ft-help-search__clear.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ft-help-section + .ft-help-section {
  margin-top: 22px;
}

.ft-help-section__title {
  margin: 0 0 8px;
  color: #607087;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ft-help-list {
  display: grid;
  gap: 8px;
}

.ft-help-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 11px 12px;
  border: 1px solid rgba(0, 64, 123, 0.1);
  border-radius: 14px;
  background: #fff;
  color: #25364a;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 40, 90, 0.035);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ft-help-topic-row:hover,
.ft-help-topic-row:focus-visible {
  border-color: rgba(13, 110, 253, 0.28);
  box-shadow: 0 9px 22px rgba(0, 40, 90, 0.07);
  outline: none;
  transform: translateY(-1px);
}

.ft-help-topic-row__text {
  min-width: 0;
}

.ft-help-topic-row__title {
  display: block;
  color: #003366;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.3;
}

.ft-help-topic-row__summary {
  display: block;
  margin-top: 3px;
  color: #66768a;
  font-size: 0.83rem;
  line-height: 1.4;
}

.ft-help-topic-row__arrow {
  color: #6c7c90;
  font-size: 0.75rem;
  text-align: center;
}

.ft-help-contact-box {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(0, 64, 123, 0.1);
  border-radius: 16px;
  background: linear-gradient(135deg, #eef6ff 0%, #fff 100%);
}

.ft-help-contact-box p {
  margin: 0 0 10px;
  color: #46566a;
  font-size: 0.9rem;
}

.ft-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #003366;
  border-radius: 999px;
  background: #003366;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ft-help-button:hover,
.ft-help-button:focus-visible {
  background: #004b8d;
  color: #fff;
  outline: none;
}

.ft-help-button--secondary {
  border-color: rgba(0, 64, 123, 0.18);
  background: #fff;
  color: #003366;
}

.ft-help-button--secondary:hover,
.ft-help-button--secondary:focus-visible {
  background: #eef6ff;
  color: #003366;
}

.ft-help-topic-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 14px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #004b8d;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.ft-help-topic-back:hover,
.ft-help-topic-back:focus-visible {
  color: #003366;
  outline: none;
}

.ft-help-topic__category {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #00407b;
  font-size: 0.76rem;
  font-weight: 800;
}

.ft-help-topic__title {
  margin: 0;
  color: #003366;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.ft-help-topic__summary {
  margin: 10px 0 0;
  color: #52647a;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
}

.ft-help-topic__answer {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(0, 64, 123, 0.1);
  border-radius: 16px;
  background: #fff;
  color: #33475c;
  font-size: 0.96rem;
  line-height: 1.65;
  box-shadow: 0 8px 22px rgba(0, 40, 90, 0.04);
}

.ft-help-topic__answer p {
  margin: 0;
}


.ft-help-topic__bullets {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: #34485f;
  font-size: 0.94rem;
  line-height: 1.5;
}

.ft-help-topic__bullets li::marker {
  color: #0d6efd;
}

.ft-help-topic__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ft-help-empty {
  padding: 24px 14px;
  border: 1px dashed rgba(0, 64, 123, 0.18);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.ft-help-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #eef6ff;
  color: #00407b;
}

.ft-help-empty h3 {
  margin: 0;
  color: #003366;
  font-size: 1.05rem;
  font-weight: 800;
}

.ft-help-empty p {
  margin: 8px 0 0;
  color: #65758a;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .ft-help-launcher {
    top: auto;
    right: auto;
    bottom: 94px;
    left: 10px;
    min-width: 112px;
    min-height: 42px;
    padding: 6px 11px 6px 8px;
    gap: 7px;
    border: 1px solid rgba(0, 75, 141, 0.22);
    border-radius: 999px;
    transform: none;
    font-size: 0.84rem;
    box-shadow: 0 7px 18px rgba(0, 40, 90, 0.16);
    backdrop-filter: blur(5px);
  }

  .ft-help-launcher__icon {
    width: 30px;
    height: 30px;
    font-size: 0.86rem;
    box-shadow: 0 2px 6px rgba(0, 64, 123, 0.15);
  }

  .ft-help-launcher:hover,
  .ft-help-launcher:focus-visible {
    box-shadow: 0 9px 22px rgba(0, 40, 90, 0.19);
    transform: translateY(-1px);
  }

  /* Na mobitelu je launcher već dovoljno uočljiv; bez početnog pulse efekta. */
  .ft-help-launcher--attention {
    animation: none;
  }

  /* Dodatni mobilni safe-space: završni sadržaj ostaje iznad fiksnog
     donjeg menija i gumba Brza pomoć. Pravilo je namjerno u ft-help.css
     kako Brza pomoć ne bi zahtijevala izmjenu zajedničkog ft-web.css-a. */
  body main {
    padding-bottom: 120px !important;
  }

  .share-buttons-inline {
    margin-bottom: 24px;
  }

  .ft-help-panel.offcanvas {
    width: 100vw;
    max-width: 100vw;
    border-left: 0;
  }

  .ft-help-panel .offcanvas-header {
    min-height: 58px;
    padding: 11px 14px;
  }

  .ft-help-view {
    padding: 14px 12px 24px;
  }

  .ft-help-intro {
    font-size: 1.25rem;
  }

  .ft-help-topic__title {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ft-help-launcher,
  .ft-help-topic-row,
  .ft-help-search__input {
    transition: none;
  }

  .ft-help-launcher--attention {
    animation: none;
  }
}

/* =========================================================
   Faza 1.4: kontekst stranice i ujednačeni razmaci
   ========================================================= */
.ft-help-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ft-help-section__heading .ft-help-section__title {
  margin: 0;
}

.ft-help-page-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 58%;
  padding: 5px 9px;
  border: 1px solid rgba(13, 110, 253, 0.14);
  border-radius: 999px;
  background: #eaf5ff;
  color: #004b8d;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Možda vas zanima" uvijek mora imati isti razmak od sadržaja iznad,
   bez obzira prethodi li mu odgovor, lista ili CTA. */
.ft-help-view[data-ft-help-view="topic"] > .ft-help-section {
  margin-top: 24px;
}

.ft-help-target {
  scroll-margin-top: 82px;
}

@media (max-width: 360px) {
  .ft-help-section__heading {
    align-items: flex-start;
  }

  .ft-help-page-badge {
    max-width: 54%;
    white-space: normal;
  }
}

/* =========================================================
   Faza 1.6: vizualna potvrda cilja nakon CTA-a iz Brze pomoći
   Ne mijenja layout; element se samo kratko istakne.
   ========================================================= */
.ft-help-target--highlight,
#kontakt-obrazac.ft-help-target--highlight {
  animation: ftHelpTargetHighlight 1.45s ease-out;
}

@keyframes ftHelpTargetHighlight {
  0% {
    box-shadow:
      0 0 0 4px rgba(13, 110, 253, 0.24),
      0 0 0 10px rgba(13, 110, 253, 0.08);
  }
  55% {
    box-shadow:
      0 0 0 3px rgba(13, 110, 253, 0.12),
      0 0 0 7px rgba(13, 110, 253, 0.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ft-help-target--highlight,
  #kontakt-obrazac.ft-help-target--highlight {
    animation: none;
    outline: 3px solid rgba(13, 110, 253, 0.28);
    outline-offset: 4px;
  }
}
