/* ==========================================================
   POLE MODEL / VIN
   ========================================================== */

/* Label i link w jednym wierszu */

.tensi-contact-form .formularz-vin-label > p {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.tensi-contact-form .formularz-vin-label br {
  display: none;
}

.tensi-contact-form .formularz-vin-label label {
  display: inline;
  width: auto;
  margin: 0;
}

/* Pomarańczowy link */

.tensi-contact-form .tensi-vin-video-open {
  display: inline;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  color: #ff6405;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  cursor: pointer;
}

.tensi-contact-form .tensi-vin-video-open:hover,
.tensi-contact-form .tensi-vin-video-open:focus {
  color: #d95000;
}

/* Taki sam odstęp jak w pozostałych polach */

.tensi-contact-form .formularz-vin-item > p:last-child {
  margin: 0 0 20px;
}

@media (max-width: 767px) {
  .tensi-contact-form .formularz-vin-label > p {
    gap: 8px;
  }
}

/* ==========================================================
   POPUP Z FILMEM VIN
   ========================================================== */

.tensi-vin-video-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.75);
    box-sizing: border-box;
}

.tensi-vin-video-modal.is-open {
    display: flex;
}

.tensi-vin-video-box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-areas:
        "title close"
        "video video";
    gap: 20px;
    width: 100%;
    max-width: 900px;
    max-height: calc(100dvh - 60px);
    padding: 20px;
    background: #fff;
    box-sizing: border-box;
    overflow: auto;
}

.tensi-vin-video-title {
    grid-area: title;
    align-self: center;
    margin: 0;
    color: #111;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.tensi-vin-video-close {
    grid-area: close;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tensi-vin-video-close:hover,
.tensi-vin-video-close:focus {
    background: transparent;
    border: 0;
    color: #ff6405;
}

.tensi-vin-video-box video {
    grid-area: video;
    display: block;
    width: 100%;
    max-height: calc(100dvh - 160px);
    margin: 0;
    background: #000;
    object-fit: contain;
}

body.tensi-vin-modal-open {
    overflow: hidden;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {
    .tensi-contact-form .formularz-vin-item {
        padding-top: 12px;
    }

    .tensi-contact-form .formularz-vin-label,
    .tensi-contact-form .formularz-vin-label > p {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .tensi-contact-form .formularz-vin-item + .formularz_kontakt_item {
        padding-top: 25px;
    }

    .tensi-vin-video-modal {
        padding: 15px;
    }

    .tensi-vin-video-box {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 15px;
        max-height: calc(100dvh - 30px);
        padding: 15px;
    }

    .tensi-vin-video-title {
        font-size: 18px;
    }

    .tensi-vin-video-box video {
        max-height: calc(100dvh - 125px);
    }
}