@font-face {
  font-family: 'Helvetica neue';
  src: url('fonts/helveticaneuethin.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica neue';
  src: url('fonts/helveticaneuelight.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica neue';
  src: url('fonts/helveticaneueroman.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica neue';
  src: url('fonts/helveticaneuemedium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --icon--close: url('data:image/svg+xml,<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.34455 1.35293L12.37 12.647" stroke="%232A2A2A" stroke-width="2" stroke-linecap="round"/><path d="M1.62997 12.6471L12.6554 1.35295" stroke="%232A2A2A" stroke-width="2" stroke-linecap="round"/></svg>');
}

/* RESET CSS */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  line-height: 1.5;
  font-family: sans-serif;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* NORMALIZER CSS */
html {
  line-height: 1.15; /* lepsza czytelność */
  -webkit-text-size-adjust: 100%; /* zapobiega zmianom rozmiaru czcionki w iOS */
}

.nav {
  width: 500px;
  height: 48px;
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 21, 81, 0.33);
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-radius: 999px;
  z-index: 1;
}

.nav__list {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.nav__item {
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
  display: block;
  font-weight: 500;
  font-size: 12px;
  padding: 12px;
  position: relative;
  cursor: pointer;
}

.nav__item.active:before {
  content: "";
  width: calc(100% - 6px);
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.31);
  z-index: -1;
  border-radius: 999px;
  opacity: 0.8;
}

main {
  display: block;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

hr {
  height: 0;
  color: inherit;
  border: 0;
  border-top: 1px solid;
}

pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

a {
  background-color: transparent;
}

abbr[title] {
  text-decoration: underline dotted;
}

b, strong {
  font-weight: bolder;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Helvetica neue', sans-serif;
    margin: 0;
    padding: 0 0 60px;
    min-height: 100svh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header__top {
  position: relative;
}

.header__top:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 230px;
  background: linear-gradient(180deg, #43ABFD 0%, rgba(67, 171, 253, 0) 100%);
}

.header__image {
  position: absolute;
  top: 64px;
  width: 280px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.top__picture {
  display: block;
  height: 100svh;
  width: 100%;
}

.top__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

main {
    flex: 1;
    width: 100%;
    padding: 64px 0 110px;
}

.content__section + .content__section {
  margin-top: 48px;
}

.section__heading {
  font-size: 24px;
  letter-spacing: 16px;
  font-weight: 300;
  color: rgba(148, 148, 148, 1);
  margin-bottom: 48px;
  text-align: center;
  width: 100%;
}

.section__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 480px;
  margin: 0 auto;
}

.list__row {
  display: flex;
  gap: 48px;
}

.row__title {
  width: 120px;
  color: #003352;
  font-weight: 200;
  font-size: 18px;
}

.row__items {
  flex: 1;
  color: #003352;
  font-weight: 300;
  font-size: 18px;
}

.gallery {
  margin-top: 48px;
}

#car_mediaPhotos {
  width: 600px;
  margin: 0 auto;
}

#car_mediaPhotos p, #car_mediaPhotos span {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  color: #003352;
}

#car_mediaPhotos p + p {
  margin-top: 14px;
}

#car_mediaPhotos input {
  display: none;
}

#car_mediaPhotos #dropArea {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  margin-bottom: 32px;
  padding: 23px 15px;
  border: 2px dashed #003352;
  border-radius: 8px;
  transition: brackground 0.3s linear;
}

#car_mediaPhotos #dropArea.drag {
  background: #b7dff7;
}

#car_mediaPhotos #dropArea.drag > * {
  pointer-events: none;
}

/* Zamiast :has() – trzeba to kontrolować klasami przez JS */
#car_mediaPhotos #dropArea:not(.enabled) > .loader {
  display: none;
}

#car_mediaPhotos #dropArea.disabled {
  pointer-events: none;
}

#car_mediaPhotos #dropArea.disabled > .loader {
  position: absolute;
  inset: 0;
}

#car_mediaPhotos #dropArea.disabled > .loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(var(--white--1), 0.8);
}

#car_mediaPhotos #dropArea.disabled > .loader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 8px solid var(--lightGray--1);
  border-top: 8px solid var(--orange--15);
  border-radius: 100%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  animation: spin 2s linear infinite;
}

#car_mediaPhotos .dropArea__errors {
  position: absolute;
  top: 0;
  right: 0;
}

/* Ukryj placeholder jeśli dropArea__preview nie jest puste (obsłuż w JS) */
#car_mediaPhotos .dropArea__previewPlaceholder.hidden {
  display: none;
}

#car_mediaPhotos .dropArea__preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

#car_mediaPhotos .dropArea__preview:empty {
  display: none;
}

.btn--addMedia {
  width: 296px;
  background: #DEF2FF;
  border-radius: 30px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  color: #003352;
  padding: 12px;
  text-align: center;
}

.btn--upload {
  border-radius: 30px;
  border: none;
  display: block;
  margin: 0 auto;
  background-color: #003352;
  color: #fff;
  font-size: 14px;
  line-height: 18px;
  padding: 12px;
  width: 328px;
}

@media screen and (min-width: 768px) {
  #car_mediaPhotos .dropArea__preview {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (min-width: 992px) {
  #car_mediaPhotos .dropArea__preview {
    grid-template-columns: repeat(5, 1fr);
  }
}

#car_mediaPhotos .dropArea__preview .previewElem {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--lightGray--9);
  border-radius: 2px;
  box-sizing: border-box;
}

#car_mediaPhotos .dropArea__preview .previewElem::after {
  content: attr(data-filename);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  background-color: rgba(var(--white--1), 0.8);
  font-size: 12px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#car_mediaPhotos .dropArea__preview .btn--remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background-image: var(--icon--close);
  background-repeat: no-repeat;
  background-position: center;
  border: 0;
  border-radius: 99px;
  font-size: 0;
  color: transparent;
}

#car_mediaPhotos .dropArea__preview img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

#car_mediaPhotos .dropArea__preview > .loading > .loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(var(--white--1), 0.8);
}

#car_mediaPhotos .dropArea__preview > .loading > .loader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 8px solid var(--lightGray--1);
  border-top: 8px solid var(--orange--15);
  border-radius: 100%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  animation: spin 2s linear infinite;
}

#car_mediaPhotos .dropArea__preview > .loading.previewElem--img img {
  display: none;
}

[data-section-bar="Harmonogram"] .section__list {
  position: relative;
  --timeline-x: 48%;
  width: 380px;
}

[data-section-bar="Harmonogram"] .section__list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--timeline-x);
  width: 2px;
  transform: translateX(-50%);
  background: #F3F3F3;
}

[data-section-bar="Harmonogram"] .row__items {
  width: 40%;
  flex: unset;
}

[data-section-bar="Harmonogram"] .list__row:nth-child(2n + 1) .row__items {
  width: 44%;
}

[data-section-bar="Harmonogram"] .list__row:nth-child(2n + 1) {
  justify-content: end;
  text-align: left;
}

[data-section-bar="Harmonogram"] .list__row:nth-child(2n) {
  text-align: right;
}

.timeline__dot {
  position:absolute;
  left: var(--timeline-x);
  transform: translate(-50%,-50%);
  width: 10px;
  height: 10px;
  border-radius:50%;
  background: #003352;
  pointer-events: none;
  will-change: top;
  display: none;
}

@media screen and (max-width: 768px) {
  .nav {
    width: 328px;
    bottom: 24px;
  }

  .section__list {
    width: 328px;
  }

  .row__title {
    width: 100px;
    font-size: 16px;
  }

  .row__items {
    font-size: 16px;
  }

  #car_mediaPhotos {
    width: 348px;
    margin: 0 auto;
  }

  [data-section-bar="Harmonogram"] .section__list {
    --timeline-x: 48%;
    width: 348px;
  }
}

/* MODAL */
.modal {
  position: fixed; inset: 0; display: none; place-items: center;
  background: rgba(0,0,0,.45); z-index: 9999; padding: 24px;
}
.modal.show { display: grid; }
.modal__panel {
  max-width: 520px; width: 100%; background: #fff; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden;
}
.modal__head { padding: 14px 16px; font-weight: 400; color:#003352; }
.modal__body { padding: 16px; color:#003352; font-size: 14px; }
.modal__list { margin: 0; padding-left: 18px; }
.modal__foot { padding: 8px 16px; text-align: right; background:#f5f7fa; }
.modal__btn { padding: 6px 14px; border-radius: 30px; border: 0; background:#003352; color:#fff; font-size: 14px;}

/* disabled przy uploadzie */
#uploadBtn[disabled] { opacity: .6; pointer-events: none; }

.previewElem .progress {
  position:absolute; left:0; right:0; bottom:0; height:4px;
  background: rgba(0,0,0,.08); overflow:hidden;
}
.previewElem .progress__bar {
  width:0%; height:100%; background:#1478cc; transition: width .1s linear;
}
.previewElem.success::before,
.previewElem.error::before{
  content:""; position:absolute; inset:0; border:2px solid transparent; border-radius:2px; pointer-events:none;
}
.previewElem.success::before{ border-color: rgba(20,120,204,.6); }
.previewElem.error::before{ border-color: rgba(204,20,20,.6); }

/* Modal – progres */
.mhead { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.mhead__title { font-weight:400; color:#003352; max-width: 80%; }
.mhead__meta { font-size:12px; color:#506070; }

.moverall__bar { position:relative; height:6px; background:#e8eef4; border-radius:4px; overflow:hidden; }
.moverall__fill { position:absolute; left:0; top:0; bottom:0; width:0%; background:#1478cc; }

.mlist { max-height:50vh; overflow:auto; margin-top:12px; padding-right: 8px;}
.mrow { padding:8px 0; border-bottom:1px solid #eef2f6; }
.mrow:last-child { border-bottom:none; }
.mrow__top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.mrow__name { font-size:13px; color:#003352; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:80%; }
.mrow__status { font-size:12px; color:#506070; }
.mrow__bar { position:relative; height:4px; background:#edf3f8; border-radius:3px; overflow:hidden; }
.mrow__barFill { position:absolute; left:0; top:0; bottom:0; width:0%; background:#4097e6; }

.mrow.ok .mrow__bar { background:#eaf6ef; }
.mrow.ok .mrow__barFill { background:#21a453; }
.mrow.err .mrow__bar { background:#f8eaea; }
.mrow.err .mrow__barFill { background:#d53b3b; }
