/* BILONLINE STANDARD FORM SETTINGS */

.bo-flip-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
}

.bo-form-group.full {
  flex: 0 0 100%;
}

.bo-form-group.half {
  flex: 0 0 calc((100% - 1rem) / 2);
}

@media (max-width: 767.98px) {
  .bo-form-group.half {
    flex: 0 0 100%;
  }
}

/* Form floating > Textarea */
.form-floating textarea.form-control {
  height: auto !important;
  min-height: 100px;
  resize: vertical;
  padding-top: 1.4rem;
  padding-bottom: .8rem;
}

.form-floating > textarea.form-control:focus ~ label,
.form-floating > textarea.form-control:not(:placeholder-shown) ~ label {
  opacity: .65;
  transform: scale(.85) translateY(-.6rem) translateX(.15rem);
}

/* Form check */
.form-check a {
  color: var(--dgb-primary);
  text-decoration: none;
}

/* =========================================================
   BO - Section Form (Full width image)
========================================================= */

.bo-section-form {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .bo-section-form {
    overflow-x: hidden;
  }
}

.bo-section-form .bo-container-xl {
  overflow: visible;
}

.bo-section-form .bo-flip-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.bo-section-form .bo-form-media,
.bo-section-form .bo-form-content {
  min-width: 0;
}

/* Desktop/tablet: låt bilden bryta ut från container till viewport-kant */
@media (min-width: 768px) {
  .bo-section-form .bo-form-media {
    position: relative;
    flex: 0 0 calc(50% + ((100vw - 100%) / 2));
    margin-left: calc((100vw - 100%) / -2);
    min-height: 560px;
    overflow: hidden;
    padding: 0 !important;
  }

  .bo-section-form .bo-form-content {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    padding-top: clamp(4rem, 5vw, 6.25rem);
    padding-bottom: clamp(4rem, 5vw, 6.25rem);
    padding-left: clamp(3rem, 5vw, 6.5rem);
  }

  .bo-section-form .bo-flip-form {
    width: 100%;
  }
}

/* Bilden fyller hela den utbrutna mediahalvan */
.bo-section-form .bo-form-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  animation: boFormKenBurns 16s ease-in-out infinite alternate;
  will-change: transform;
}

/* Ken Burns */
@keyframes boFormKenBurns {
  0% {
    transform: scale(1.05) translate3d(-1.5%, -1%, 0);
  }

  100% {
    transform: scale(1.18) translate3d(1.5%, 1%, 0);
  }
}

/* Mobil: bild alltid ovanför, ingen breakout */
@media (max-width: 767.98px) {
  .bo-section-form .bo-flip-row {
    flex-direction: column !important;
  }

  .bo-section-form .bo-form-media {
    order: -1;
    position: relative;
    flex: none;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
    padding: 0 !important;
  }

  .bo-section-form .bo-form-content {
    order: 1;
    flex: none;
    width: 100%;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Reducerad rörelse */
@media (prefers-reduced-motion: reduce) {
  .bo-section-form .bo-form-media img {
    animation: none;
    transform: scale(1.08);
  }
}

/* =========================================================
   BO - Section Form Variant (Full width image)
========================================================= */

@media (min-width: 768px) {
  .bo-section-form.bo-form-media-right .bo-form-media {
    order: 2;
    margin-left: 0;
    margin-right: calc((100vw - 100%) / -2);
  }

  .bo-section-form.bo-form-media-right .bo-form-content {
    order: 1;
    padding-left: 0;
    padding-right: clamp(3rem, 5vw, 6.5rem);
  }
}

/* Mobil: oavsett höger/vänster på desktop ska bilden alltid ligga överst */
@media (max-width: 767.98px) {
  .bo-section-form.bo-form-media-right .bo-form-media {
    /*order: -1;*/
    /*margin-left: 0;*/
    /*margin-right: 0;*/
  }

  .bo-section-form.bo-form-media-right .bo-form-content {
    order: 1;
    padding-right: 0;
  }
}

@media (max-width: 767.98px) {
  .bo-section-form .bo-form-media {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 !important;
    border-radius: 0;
    overflow: hidden;
  }
}

/* =========================================================
   General
========================================================= */

@media (max-width: 767.98px) {
  .bo-flip-content.flex-row{
  	flex-direction:column!important;
  	gap:2rem;
  }
  
  .form-check-label.small{
  	text-align:left;
  }
}

