/* ------ */
/* HLÁŠENÍ ZÁVAD - boční záložka + výsuvný panel */
:root {
  --fault-color: #E30613; /* výrazná červená na přání klienta */
}
.fault-tab-wrap {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  transform: translateY(-50%);
}
.fault-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 30px 12px 30px 22px; /* po otočení je levý padding vpravo - 10 px navíc schovaných za okrajem */
  margin-right: -10px;
  border: 0;
  border-radius: 0 38px 38px 0; /* po otočení o 180° = vizuálně oba levé rohy */
  background: var(--fault-color);
  color: #FFF;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: background 0.25s ease, translate 0.25s ease;
  cursor: pointer;
}
.fault-tab:hover,
.fault-tab:focus-visible {
  background: #000;
  translate: -10px 0; /* povytáhne celou záložku i s obsahem */
}
.fault-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFF;
  color: var(--fault-color);
}
.fault-tab-icon svg {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}
/* zatahovací šipka - jen na mobilu */
.fault-tab-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: flex-start; /* zarovnat k levé hraně záložky */
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  position: relative;
  border-radius: 50%;
  background: #000;
  color: #FFF;
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, border-radius 0.3s ease, background 0.25s ease;
  cursor: pointer;
}
.fault-tab-toggle::before {
  content: "";
  position: absolute;
  inset: -12px; /* větší plocha pro prst, kolečko samo je malé */
}
.fault-tab-toggle svg {
  flex: none;
  width: 13px;
  height: 13px;
  transition: transform 0.3s ease;
}
@media screen and (max-width: 599px) {
  .fault-tab-toggle {
    display: flex;
  }
  /* zatažená: zůstane jen oranžový jazýček u okraje */
  .fault-tab-wrap.is-collapsed .fault-tab {
    translate: 110% 0;
    visibility: hidden;
    transition: translate 0.3s ease, visibility 0s 0.3s;
  }
  .fault-tab-wrap.is-collapsed .fault-tab-toggle {
    align-self: flex-end;
    width: 12px; /* úzký jazýček - nezasahuje přes okraj stránky do obsahu */
    height: 56px;
    border-radius: 12px 0 0 12px;
    background: var(--fault-color);
  }
  .fault-tab-wrap.is-collapsed .fault-tab-toggle svg {
    width: 13px;
    height: 13px;
    margin-left: 1px;
    overflow: visible;
    transform: rotate(180deg);
  }
  .fault-tab {
    gap: 8px;
    padding: 16px 7px 16px 17px;
    border-radius: 0 20px 20px 0;
    font-size: 15px;
  }
  .fault-tab-icon {
    width: 24px;
    height: 24px;
  }
  .fault-tab-icon svg {
    width: 13px;
    height: 13px;
  }
}
@media print {
  .fault-tab-wrap {
    display: none;
  }
}

.fault-panel.offcanvas {
  --bs-offcanvas-width: min(680px, 100%);
  --bs-offcanvas-bg: #f6f6f6;
  --bs-offcanvas-padding-x: 30px;
  --bs-offcanvas-padding-y: 30px;
  border-left: 0;
}
.fault-panel .offcanvas-header {
  display: block;
  padding-top: 60px;
  padding-bottom: 30px; /* pruh s nadpisem zůstává nahoře, obsah pod ním odjíždí s odstupem */
}
.fault-panel .offcanvas-title {
  margin: 0;
  line-height: 1.1;
  text-box: none; /* ořez z h2 v Safari slepil nadpis s textem pod ním */
}
.fault-panel .btn-close {
  position: absolute;
  top: 20px;
  right: 20px;
  margin: 0;
}
.fault-panel .offcanvas-body {
  padding-top: 20px;
}
.fault-panel .fault-panel-intro {
  margin-bottom: 30px;
}
.fault-panel .fault-hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  margin: -12px 0 30px;
}
.fault-panel .fault-hours dt {
  font-weight: 600;
}
.fault-panel .fault-hours dd {
  margin: 0;
}
.fault-panel .fault-panel-intro a {
  color: #FA7702;
}
.fault-panel .form-check-label a {
  color: inherit;
}
.fault-panel .fault-number-hint {
  margin-top: -18px;
  font-size: 14px;
  color: #6c6c6c;
}
.fault-panel .fault-number-hint.is-invalid {
  color: #dc3545;
}
.fault-panel .fault-recaptcha-error {
  display: none;
  margin-top: -18px;
  font-size: 14px;
  color: #dc3545;
}
.fault-panel .fault-recaptcha-error.is-visible {
  display: block;
}
@media screen and (min-width: 600px) {
  .fault-panel.offcanvas {
    --bs-offcanvas-padding-x: 40px;
  }
  .fault-panel .offcanvas-header {
    padding-top: 90px;
  }
}

/* ------ */
/* Pole pro přílohu (všechny formuláře na webu) - nativní input je průhledný přes celé pole,
   text a tlačítko kreslíme sami (Safari u nativního pole ignoruje odsazení a text lezl pod tlačítko).
   Obalení dělá fault-report.js. Patří spíš do style.css místo stávajících input[type=file] pravidel. */
.file-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 11px 5px 11px 16px;
  border-radius: var(--radius);
  background: #FFF;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.file-field input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.file-field-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #B6B6B6;
  transition: color 0.25s ease;
}
.file-field.has-file .file-field-name {
  color: #000;
}
.file-field-btn {
  flex: none;
  min-width: 141px;
  height: 30px;
  padding: 0 10px;
  border-radius: 50px;
  background: #B6B6B6;
  color: #FFF;
  font-weight: 400;
  font-size: 17px;
  line-height: 30px;
  text-align: center;
  transition: background 0.25s ease;
}
.file-field:hover .file-field-name,
.file-field:focus-within .file-field-name {
  color: #000;
}
.file-field:hover .file-field-btn,
.file-field:focus-within .file-field-btn {
  background: #000;
}
.file-field:focus-within {
  outline: 2px solid #FA7702;
  outline-offset: 2px;
}
@media screen and (max-width: 419px) {
  .file-field-btn {
    min-width: 0;
    font-size: 15px;
  }
}

/* ------ */
/* HLÁŠENÍ ZÁVAD - velký blok v úvodním videu (jen úvodní stránka, jen od 992 px; na mobilu zůstává boční záložka) */
.fault-hero {
  display: none;
}
@media screen and (min-width: 992px) {
  .hero .header-video {
    grid-row: 1;
    grid-column: 1;
  }
  .fault-hero {
    /* stejná buňka mřížky jako video v .hero, přilepené vpravo dole */
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    justify-self: end;
    position: relative;
    z-index: 2;
    margin-bottom: 60px; /* výš by překrýval text přímo ve videu */
    display: flex;
    align-items: center;
    gap: 21px;
    padding: 13px 58px 13px 13px; /* 10 px navíc schovaných za okrajem */
    margin-right: -10px;
    border: 0;
    border-radius: 70px 0 0 70px;
    background: var(--fault-color);
    color: #FFF;
    text-align: left;
    cursor: pointer;
    /* při scrollu se zasouvá do okraje; --fault-hero-p (0-1) nastavuje fault-report.js */
    transform: translateX(calc(var(--fault-hero-p, 0) * 110%));
    transition: translate 0.25s ease;
    animation: fault-hero-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s backwards; /* po načtení vyjede zprava */
  }
  @keyframes fault-hero-in {
    from {
      transform: translateX(110%);
    }
    to {
      transform: none;
    }
  }
  .fault-hero:hover,
  .fault-hero:focus-visible {
    translate: -10px 0;
  }
  .fault-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: #FFF;
    color: var(--fault-color);
  }
  .fault-hero-icon svg {
    width: 42px;
    height: 42px;
  }
  .fault-hero-text {
    display: grid;
    justify-items: start;
    gap: 13px;
  }
  .fault-hero-title {
    font-weight: 700;
    font-size: 29px;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .fault-hero-btn {
    padding: 8px 20px;
    border: 1px solid #FFF;
    border-radius: 50px;
    background: transparent;
    color: #FFF;
    font-weight: 400;
    font-size: 20px;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease;
  }
  .fault-hero:hover .fault-hero-btn,
  .fault-hero:focus-visible .fault-hero-btn {
    background: #FFF;
    color: var(--fault-color);
  }
  /* na úvodní stránce je malá záložka schovaná, dokud se velký blok při scrollu nezasune (řídí fault-report.js) */
  .fault-tab-wrap {
    transition: translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
  }
  .hp .fault-tab-wrap:not(.is-hero-passed) {
    translate: 110% 0;
    visibility: hidden;
    transition: translate 0.2s ease, visibility 0s 0.2s;
  }
}
/* menší počítače - velký blok by překryl text ve videu, zůstává kompaktní verze */
@media screen and (min-width: 992px) and (max-width: 1279px) {
  .fault-hero {
    gap: 16px;
    padding: 10px 46px 10px 10px;
    border-radius: 50px 0 0 50px;
  }
  .fault-hero-icon {
    width: 64px;
    height: 64px;
  }
  .fault-hero-icon svg {
    width: 32px;
    height: 32px;
  }
  .fault-hero-text {
    gap: 10px;
  }
  .fault-hero-title {
    font-size: 22px;
  }
  .fault-hero-btn {
    padding: 6px 15px;
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fault-hero {
    animation: none;
  }
}
