.carousel_block{
    background-color: grey;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: end;
    margin-bottom: 70px;
    padding: 0;
}

.carousel_block *{
    margin: 0;
    padding: 0;
}

.carousel_block-wrapper{
    height: inherit;
    width: inherit;
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
}
.carousel_block-wrapper img{
    height: 100%;
    width: 100%;
    
}


.carousel_block-slide{
    display: none;
  /*  justify-content: center;
    align-items: center;
    text-align: center;*/
    height: inherit;
    width: inherit;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    background-color: #FFFFFF;
    transform: translate(100%, 0); 
    opacity: 0;
}

input[name="carousel_block-css"]{
  -webkit-appearance: none;
  appearance: none;
  margin: 0;

  border: 1px solid rgb(150,150,150);
  background-color: rgb(250,250,250);

  width: 1.5rem;
  height: 1.5rem;

  cursor: pointer;
  border-radius: 50%;

  display: inline-flex;
  justify-content: center;
  align-items: center;
  top: 55px;
  position: relative;
  z-index: 3;
  margin: 0.125rem;
}

input[name="carousel_block-css"]:checked{
    display: inline-flex;
}

input[name="carousel_block-css"]:checked::before{
    content: "";
    background-color: #6495ED;
    border-radius: 50%;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
}

/* Hide unnecessary radio buttons */

input[name="carousel_block-css"][value="slide-20"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(19),
input[name="carousel_block-css"][value="slide-19"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(18),
input[name="carousel_block-css"][value="slide-18"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(17),
input[name="carousel_block-css"][value="slide-17"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(16),
input[name="carousel_block-css"][value="slide-16"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(15),
input[name="carousel_block-css"][value="slide-15"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(14),
input[name="carousel_block-css"][value="slide-14"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(13),
input[name="carousel_block-css"][value="slide-13"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(12),
input[name="carousel_block-css"][value="slide-12"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(11),
input[name="carousel_block-css"][value="slide-11"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(10),
input[name="carousel_block-css"][value="slide-10"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(9),
input[name="carousel_block-css"][value="slide-9"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(8),
input[name="carousel_block-css"][value="slide-8"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(7),
input[name="carousel_block-css"][value="slide-7"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(6),
input[name="carousel_block-css"][value="slide-6"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(5),
input[name="carousel_block-css"][value="slide-5"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(4),
input[name="carousel_block-css"][value="slide-4"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(3),
input[name="carousel_block-css"][value="slide-3"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(2),
input[name="carousel_block-css"][value="slide-2"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(1),
input[name="carousel_block-css"][value="slide-1"]:checked ~ .carousel_block-wrapper .carousel_block-slide:last-of-type{
    display: flex;
    opacity: 1;
    transform: translate(-100%, 0);
    transition: 0.5s transform, 0.1s z-index 0.4s;
}

input[name="carousel_block-css"][value="slide-1"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(2),
input[name="carousel_block-css"][value="slide-2"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(3),
input[name="carousel_block-css"][value="slide-3"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(4),
input[name="carousel_block-css"][value="slide-4"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(5),
input[name="carousel_block-css"][value="slide-5"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(6),
input[name="carousel_block-css"][value="slide-6"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(7),
input[name="carousel_block-css"][value="slide-7"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(8),
input[name="carousel_block-css"][value="slide-8"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(9),
input[name="carousel_block-css"][value="slide-9"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(10),
input[name="carousel_block-css"][value="slide-10"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(11),
input[name="carousel_block-css"][value="slide-11"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(12),
input[name="carousel_block-css"][value="slide-12"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(13),
input[name="carousel_block-css"][value="slide-13"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(14),
input[name="carousel_block-css"][value="slide-14"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(15),
input[name="carousel_block-css"][value="slide-15"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(16),
input[name="carousel_block-css"][value="slide-16"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(17),
input[name="carousel_block-css"][value="slide-17"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(18),
input[name="carousel_block-css"][value="slide-18"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(19),
input[name="carousel_block-css"][value="slide-19"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(20),
input[name="carousel_block-css"]:last-of-type:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(1){
    display: flex;
    opacity: 1;
    transform: translate(100%, 0);
    transition: 0.5s transform, 0.1s z-index 0.4s;
}


/* Actions from the radio buttons */

input[name="carousel_block-css"][value="slide-1"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(1),
input[name="carousel_block-css"][value="slide-2"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(2),
input[name="carousel_block-css"][value="slide-3"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(3),
input[name="carousel_block-css"][value="slide-4"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(4),
input[name="carousel_block-css"][value="slide-5"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(5),
input[name="carousel_block-css"][value="slide-6"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(6),
input[name="carousel_block-css"][value="slide-7"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(7),
input[name="carousel_block-css"][value="slide-8"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(8),
input[name="carousel_block-css"][value="slide-9"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(9),
input[name="carousel_block-css"][value="slide-10"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(10),
input[name="carousel_block-css"][value="slide-11"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(11),
input[name="carousel_block-css"][value="slide-12"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(12),
input[name="carousel_block-css"][value="slide-13"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(13),
input[name="carousel_block-css"][value="slide-14"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(14),
input[name="carousel_block-css"][value="slide-15"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(15),
input[name="carousel_block-css"][value="slide-16"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(16),
input[name="carousel_block-css"][value="slide-17"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(17),
input[name="carousel_block-css"][value="slide-18"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(18),
input[name="carousel_block-css"][value="slide-19"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(19),
input[name="carousel_block-css"][value="slide-20"]:checked ~ .carousel_block-wrapper .carousel_block-slide:nth-child(20){
    display: flex;
    transition: 0.5s transform;
    transform: translate(0, 0);
    opacity: 1;
    z-index: 2;
}

/* Next and prev buttons */

.carousel_block label[data-value|="slide"]{
    width: 0 !important;
    height: 0 !important;
}

.carousel_block label[data-value|="slide"]::before,
.carousel_block label[data-value|="slide"]::after{
    content: "";
    display: none;
    position: absolute;
    z-index: 3;

    width: 3rem;
    height: 3rem;

    background-color: rgba(10,10,10,0.5);
    border-radius: 0.5rem;
    opacity: 1;

    cursor: pointer;

    bottom: -65px;
    margin: auto 0;

    background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Im02NDAtODAtNDAwLTQwMCA0MDAtNDAwIDU2IDU3LTM0MyAzNDMgMzQzIDM0M3oiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==");
}

.carousel_block label[data-value|="slide"]::after{
    transform: rotate(180deg);
}

.carousel_block label[data-value|="slide"]::before:hover,
.carousel_block label[data-value|="slide"]::before:after{
    background-color: rgba(10,10,10,0.8);
}

input[name="carousel_block-css"][value="slide-1"]:checked ~ label[data-value|="slide"]:last-of-type::before,
input[name="carousel_block-css"][value="slide-2"]:checked ~ label[data-value="slide-1"]::before,
input[name="carousel_block-css"][value="slide-3"]:checked ~ label[data-value="slide-2"]::before,
input[name="carousel_block-css"][value="slide-4"]:checked ~ label[data-value="slide-3"]::before,
input[name="carousel_block-css"][value="slide-5"]:checked ~ label[data-value="slide-4"]::before,
input[name="carousel_block-css"][value="slide-6"]:checked ~ label[data-value="slide-5"]::before,
input[name="carousel_block-css"][value="slide-7"]:checked ~ label[data-value="slide-6"]::before,
input[name="carousel_block-css"][value="slide-8"]:checked ~ label[data-value="slide-7"]::before,
input[name="carousel_block-css"][value="slide-9"]:checked ~ label[data-value="slide-8"]::before,
input[name="carousel_block-css"][value="slide-10"]:checked ~ label[data-value="slide-9"]::before,
input[name="carousel_block-css"][value="slide-11"]:checked ~ label[data-value="slide-10"]::before,
input[name="carousel_block-css"][value="slide-12"]:checked ~ label[data-value="slide-11"]::before,
input[name="carousel_block-css"][value="slide-13"]:checked ~ label[data-value="slide-12"]::before,
input[name="carousel_block-css"][value="slide-14"]:checked ~ label[data-value="slide-13"]::before,
input[name="carousel_block-css"][value="slide-15"]:checked ~ label[data-value="slide-14"]::before,
input[name="carousel_block-css"][value="slide-16"]:checked ~ label[data-value="slide-15"]::before,
input[name="carousel_block-css"][value="slide-17"]:checked ~ label[data-value="slide-16"]::before,
input[name="carousel_block-css"][value="slide-18"]:checked ~ label[data-value="slide-17"]::before,
input[name="carousel_block-css"][value="slide-19"]:checked ~ label[data-value="slide-18"]::before,
input[name="carousel_block-css"][value="slide-20"]:checked ~ label[data-value="slide-19"]::before{
    display: inline-block;
    left: 0rem;
}

input[name="carousel_block-css"][value|="slide"]:last-of-type:checked ~ label[data-value="slide-1"]::after,
input[name="carousel_block-css"][value="slide-1"]:checked ~ label[data-value="slide-2"]::after,
input[name="carousel_block-css"][value="slide-2"]:checked ~ label[data-value="slide-3"]::after,
input[name="carousel_block-css"][value="slide-3"]:checked ~ label[data-value="slide-4"]::after,
input[name="carousel_block-css"][value="slide-4"]:checked ~ label[data-value="slide-5"]::after,
input[name="carousel_block-css"][value="slide-5"]:checked ~ label[data-value="slide-6"]::after,
input[name="carousel_block-css"][value="slide-6"]:checked ~ label[data-value="slide-7"]::after,
input[name="carousel_block-css"][value="slide-7"]:checked ~ label[data-value="slide-8"]::after,
input[name="carousel_block-css"][value="slide-8"]:checked ~ label[data-value="slide-9"]::after,
input[name="carousel_block-css"][value="slide-9"]:checked ~ label[data-value="slide-10"]::after,
input[name="carousel_block-css"][value="slide-10"]:checked ~ label[data-value="slide-11"]::after,
input[name="carousel_block-css"][value="slide-11"]:checked ~ label[data-value="slide-12"]::after,
input[name="carousel_block-css"][value="slide-12"]:checked ~ label[data-value="slide-13"]::after,
input[name="carousel_block-css"][value="slide-13"]:checked ~ label[data-value="slide-14"]::after,
input[name="carousel_block-css"][value="slide-14"]:checked ~ label[data-value="slide-15"]::after,
input[name="carousel_block-css"][value="slide-15"]:checked ~ label[data-value="slide-16"]::after,
input[name="carousel_block-css"][value="slide-16"]:checked ~ label[data-value="slide-17"]::after,
input[name="carousel_block-css"][value="slide-17"]:checked ~ label[data-value="slide-18"]::after,
input[name="carousel_block-css"][value="slide-18"]:checked ~ label[data-value="slide-19"]::after,
input[name="carousel_block-css"][value="slide-19"]:checked ~ label[data-value="slide-20"]::after{
    display: inline-block;
    right: 0rem;
}

/* Special functions for the carousel_block */

.carousel_block-no-bullets input[name="carousel_block-css"][value|="slide"]{
    display: none;
}

.carousel_block-non-selectable{
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none; 
}
