$ddpurple:    #632CA6;
$screen-lg: 1200px;
$screen-lg-min: $screen-lg;
$screen-md: 992px;
$screen-md-min: $screen-md;
$screen-sm: 768px;
$screen-sm-min: $screen-sm;
$screen-xs-max: ($screen-sm-min - 1) !default;
$screen-sm-max: ($screen-md-min - 1) !default;
$screen-md-max: ($screen-lg-min - 1) !default;

.integrations {
  input[data-ref="search"] {
    padding: 1rem 0.75rem;
    font-size: 18px;
    line-height: 27px;
    border-radius: 2px;

    &::placeholder {
      color: #888888;
    }
  }

  .input-group-text {
    display: block;
    background: #c4c4c4;
    border-radius: 2px 0px 0px 2px;
    padding: 0.45rem 1rem;
  }
}

.integrations-single {
  img {
    max-width: 100%;
    height: auto;
  }

  table {
    table-layout: fixed;
    tr {
        th:empty {
            display: none;
        }
    }
  }

  table.table-metrics {
    tr {
      td {
        word-break: break-word;
        width: 50%;
      }
    }
  }
  .beta{
    span{
      color: #2C80DE;
      font-size:18px;
      line-height: 18px;
      font-weight:600;
      padding-left:7px;
    }
  }
  .callout-card{
    background: rgba(51, 153, 204, 0.1);
    border-radius: 16px;
    .btn{
      width: 138px;
      height: 34px;
      &:hover {
        background: linear-gradient(134.72deg, #3023AE 0%, #C024B6 101.5%);
        color: #fff;
      }
    }
  }
}

.filters {
  margin-top:40px;
  a {
    text-decoration: none;
  }
}

.integration-filter-mobile {
    margin-bottom: 39px;
    .dropdown.show {
        a {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }
        button {
            display: block;
            width: 100%;
            text-align: left;
            border: none;
            font-size: 22px;
            background-color: transparent;
            color: $gray-darker;
            &:focus {
                text-decoration: none;
                outline: none;
            }
        }
    }
    ul {
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
        box-shadow: none;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: 0;
        width: 100%;
    }
    li {
        height: 40px;
        line-height: 40px;
        padding: 0 16px;
        &:hover,
        &:active,
        &:focus {
            background: rgba(0, 0, 0, 0.05);
        }
    }
    .dropdown > a {
        width: 100%;
        color: $white-base;
        background: $brand-primary;
        display: block;
        font-weight: 600;
        height: 40px;
        line-height: 40px;
        border-radius: 6px;
        &:hover,
        &:active,
        &:focus {
            background: $brand-primary;
            color: $white-base;
        }
    }
}

.product-integrations {
    .integration-suggestion {
        background-color: $gray-lighter;
        a {
            color: $gray-base;
            text-decoration: none;
        }
    }

    &.integration {
        background-color: #e5e5f3;
        .sep {
            padding: 50px 0 15px;
            border-top: 1px solid #cfcece;
        }
        .back-link {
            a {
                .arrow-back-link {
                    width: 23px;
                    height: 9px;
                    position: relative;
                    margin-top: -0.1em;
                    margin-right: 0.6em;
                    display: inline-block;
                    background-repeat: no-repeat;
                    background-size: 100%;
                }
                color: #514f54;
                max-width: 705px;
                text-align: left;
                line-height: 40px;
            }
        }
        h1 {
            color: #39a1e0;
            font-size: 55px;
            font-weight: 700;
            margin: 0;
            padding: 0;
            margin-bottom: 36px;
        }
        .label {
            line-height: 12px;
            background: #cccbcb;
            border-radius: 3px;
            padding: 6px 8px;
            margin-right: 6px;
            color: #514f54;
            display: inline-block;
        }
        section {
            &.masthead {
                background-color: #e6e6e6;
                h2 {
                    margin-top: 24px;
                    margin-bottom: 14px;
                }
                ul {
                    margin-left: 24px;
                    position: relative;
                    li {
                        &:before {
                            content: '-';
                            position: absolute;
                            left: -21px;
                        }
                        padding-left: 0px;
                        list-style-type: none;
                        line-height: 28px;
                        direction: ltr;
                        font-size: 22px;
                        letter-spacing: 0.3px;
                        font-weight: 200;
                        margin-top: 0px;
                        color: #555;
                    }
                }
            }
            &.content-wrapper {
                padding-bottom: 50px;
            }
            img {
                display: block;
                width: 100%;
                border-top-right-radius: 10px;
                border-top-left-radius: 10px;
            }
            h6 {
                font-weight: 900;
                font-style: normal;
                font-size: 12px;
            }
            .related-sep {
                border-top: 1px solid #cfcece;
                margin-top: 30px;
                padding-top: 30px;
            }
            ul {
                list-style: none;
                margin: 0;
                padding: 0;
                li {
                    font-size: 16px;
                    &.image-grid {
                        padding: 0;
                        margin: 0 15px 15px 0;
                        max-width: 120px;
                    }
                    img {
                        border-radius: 0;
                    }
                }
            }
            .content {
                background-color: white;
                padding: 1.875em;
                h3 {
                    color: #39a1e0;
                    margin-top: 32px;
                    font-size: 32px;
                    line-height: 38px;
                    margin-bottom: 14px;
                }
            }
        }
        p {
            margin: 0;
            padding: 1em 0;
            font-weight: 200;
            font-size: 16px;
            letter-spacing: 0.4px;
        }
    }
}

#integrations {
    position: relative;
}

#integration-tiles {
    &.filtered {
        .integration:not(.dimmer) {
        }
    }
}

.integration-row {
    padding: 0;
    padding-bottom: 20px;

    .item {
        width: auto;
        max-width: none;
        padding-bottom: 20px;
    }
    @media (min-width: 1200px) and (max-width: 1269px){
      .item {
            width: auto;
            padding-left: 10px;
            padding-right: 10px;
        }
    }
    @media (min-width: 1270px) {
        .item {
            width: auto;
            padding-left: 10px;
            padding-right: 10px;
        }
    }
    @media (max-width: $screen-md-max) {
        .item {
            padding-left: 10px;
            padding-right: 10px;
        }
        .item:nth-child(3n + 1) {
            padding-left: 0;
        }
        .item:nth-child(3n-3) {
            padding-right: 0;
        }
    }

    @media (max-width: $screen-sm-max) {
        .item {
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
        .integration {
            height: 166px;
            width: 218px;
            img {
                display: block;
            }
            .blurb,
            .title,
            button {
                display: none;
            }
        }
    }
    @media (max-width: $screen-xs-max) {
        & {
            width: 460px !important;
            margin: 0 auto !important;
        }
        .item:nth-child(odd) {
            padding-left: 0 !important;
        }
        .item:nth-child(even) {
            padding-right: 0 !important;
        }
    }
    @media (max-width: 480px) {
        & {
            width: 360px !important;
            margin: 0 auto !important;
        }
        .item {
            padding-left: 10px;
            padding-right: 10px;
        }
        .item:nth-child(odd) {
            padding-left: 0 !important;
        }
        .item:nth-child(even) {
            padding-right: 0 !important;
        }
        .integration {
            width: 166px;
            height: 138px;
            img {
                padding-top: 2px;
            }
            &.hover,
            &:active,
            &:focus {
                padding: 0;
                -webkit-box-align: center;
                -ms-flex-align: start;
                align-items: center;
                background: none;
                border-color: $brand-primary;
                .blurb,
                .title,
                button {
                    display: none !important;
                }
                img {
                    display: block;
                }
            }
        }
    }
    @media (max-width: 360px) {
        & {
            width: 190px !important;
            margin: 0 auto !important;
        }
        .item {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
        .item:nth-child(odd) {
            padding-left: 0 !important;
        }
        .item:nth-child(even) {
            padding-right: 0 !important;
        }
    }
    //}
    &.find {
        img {
            padding-top: 0;
        }
    }
}
.find {
    a .title {
        font-size: 12px;
        text-transform: uppercase;
    }
}
.integration {
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);
    position: relative;
    font-size: 16px;
    font-weight: 600;
    line-height: 18px;
    color: #777777;
    border-radius: 4px;
    height: 164px;
    width: 212px;
    opacity: 1;
    transition: opacity 2s ease-in-out;
    -moz-transition: opacity 2s ease-in-out;
    -webkit-transition: opacity 2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    &:lang(ja),
    &:lang(ko) {
        font-size: 14px;
    }
    a {
        display: block;
        color: black;
        text-align: center;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        min-height: 136px;
        position:relative;
        height:100%;
    }
    img {
        padding: 1px;
        margin: auto;
        max-width: 180px;
    }
    .card-banner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 22px;
        background: #f2f2f2;
        border-radius: 4px 4px 0px 0px;

        p {
            font-size: 16px;
            line-height: 16px;
            margin-top: 2px;
        }
    }
    .picture-title {
        bottom: 0px;
        display: flex;
        font-size: 14px;
        line-height: 18px;
        position: absolute;
        width: 100%;
        min-height:50px;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .title {
        display: none;
        font-size: 16px;
        line-height: 16px;

        &:before {
            content: '';
            width: 85%;
            height: 1px;
            display: block;
            border-top: 1px solid #e3e3e3;
            margin: 0 auto;
            padding-left: 10px;
            padding-right: 10px;
        }
    }
    .blurb {
        display: none;
    }
    button {
        display: none;
        text-transform: uppercase;
    }
    &.hover {
        background: white;
        color: #333;
        padding: 11px 5px 0 5px;
        cursor: pointer;
        border-color: $brand-primary;
        align-items: flex-start;

        a {
            min-height: 0px;
        }
        img {
            display: none;
        }
        .picture-title {
            display: none;
        }
        .title {
            display: block !important;
            font-weight: 600;
            color: #333;
            padding-bottom: 3px;
            &:before {
                display: none;
            }
        }
        .blurb {
            display: block;
            font-weight: 200;
            color: #333;
            font-size: 16px;
            line-height: 18px;
        }
        button {
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            margin: 0 auto;
            width: 85%;
            margin-bottom: 14px;
            background: #632ca6;
            border-radius: 4px;
            color: #fff;
            border: none;
            padding-bottom: 4px;
            font-size: 14px;
            line-height: 18px;
            font-weight: 700;
            &:lang(ja),
            &:lang(ko) {
                padding-bottom: 1px;
                font-size: 12px;
            }
            &:hover {
                background: rgba(99, 44, 166, 0.7);
            }
        }

        .card-content {
            height: 100%;
            min-width: 100%;
        }
    }
}

.integration-marketplace {
    .card-content {
        padding-top: 1rem;
    }

    &:hover {
        button {
            margin-bottom: 9px;
        }
    }
}

.integration-filter {
    text-align: center;
    margin-bottom: 32px;
    ul {
        display: inline-block;
    }
    li {
        margin-right: 3px;
        margin-bottom: 4px;
        margin-left: 0 !important;
        display: inline-block;
        text-align: justify;
        cursor: pointer;
        float: none;
        a {
            &:lang(ja),
            &:lang(ko) {
                font-size: 14px;
            }
        }
        button {
            padding: 5px 10px 7px;
            background: #fff;
            color: #777777;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            line-height: 16px;
            border: 1px solid #c8c8c8;
            &:lang(ja),
            &:lang(ko) {
                font-size: 14px;
            }
            &:hover {
                opacity: 1 !important;
                background: $brand-primary;
                border-color: $brand-primary;
                color: #fff;
            }
            &:focus {
                text-decoration: none;
                outline: none;
            }
        }

        &.active {
            button {
                border-color: $brand-primary;
                background: $brand-primary;
                color: #fff;
            }
        }
    }
}

.integration {
    &.dimmer {
        display: block !important;
        border: 1px solid rgb(245, 245, 245);
        .dimmer-cloak {
            opacity: 1;
            width: 100%;
            height: 100%;
        }
        &.hover {
            .dimmer-cloak {
                opacity: 0;
                width: 0;
                height: 0;
            }
        }
    }
}

.dimmer-cloak {
    display: block;
    width: 0;
    height: 0;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    z-index: 2;
    transition: opacity 0.15s;
    -moz-transition: opacity 0.15s;
    -webkit-transition: opacity 0.15s;
}

.integration-search {
  height: calc(1.5em + .75rem + 2px);
}

.integrations-carousel {
    [x-cloak] {
        display: none;
    }
    margin-bottom: 36px;
    p{
        font-size: 16px;
    }
    .carousel-top-row {
        min-height: 194px;
        margin-bottom: 12px;
        @media(min-width: 768px){
            height: 297px;
        }
        @media(min-width: 992px){
            height: 200px;
        }
        @media(min-width: 1200px){
            height: 326px;
        }

        @media (min-width: 768px) {
            .carousel-wrapper__horizontal:hover{
                .carousel-controller__arrow{
                    opacity: 1;
                }
                .play-btn {
                    background-color: rgba(0, 0, 0, 0.4) !important;
                }
            }
        }

        .carousel-wrapper__horizontal {
            .carousel-items__horizontal{
                margin-right: 12px;
                display: grid;
                grid-template-columns: 1fr;
                grid-template-rows: 1fr;

                .carousel-item__horizontal {
                    min-height: fit-content;
                    grid-column: 1/-1;
                    grid-row: 1/-1;
                    &:not(.video-item) {
                        border: 1px solid #e2e5ed;
                        pointer-events: none;
                        @media(min-width: 768px){
                            pointer-events: initial;
                            cursor: zoom-in;
                        }
                    }
                    img:not(.play-overlay) {
                        object-fit: contain;
                    }
                    .play-overlay {
                        z-index: 2;
                        cursor: pointer;
                    }
                    .play-btn {
                        z-index: 2;
                        width: 64px;
                        height: 64px;
                        background-color: rgba(0, 0, 0, 0.6);
                        border: none;
                        transition: all .3s linear;
                        .play-icon {
                            width: 0;
                            height: 0;
                            border-left: 15px solid transparent;
                            border-right: 15px solid transparent;
                            border-bottom: 30px solid rgba(255, 255, 255, 0.6);
                            transform: rotate(90deg);
                            left: 30%;
                        }
                    }
                }
            }
            .carousel-controller__arrow {
                z-index: 4;
                opacity: 0;
                width: 26px;
                height: 26px;
                box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.25);
                transition: all .3s;
                .control-arrow{
                    height: 10px;
                    width: 10px;
                    border-bottom: solid 2px #969696;
                    border-left: solid 2px #969696;
                    position: relative;
                }
                @media (max-width: 767px) {
                    opacity: 1;
                }

                &.prev{
                    left: 8px;
                    .control-arrow{
                        left: 10px;
                        transform: rotate(45deg);
                    }
                }
                &.next{
                    right: 20px;
                    .control-arrow{
                        left: 6px;
                        transform: rotate(-135deg);
                    }
                }
            }
        }

        .carousel-items__vertical {
            scroll-behavior: smooth;
            .carousel-item__vertical {
                background-size: cover;
                height: 91px;
                margin-top: 12px;
                margin-bottom: 12px;
                border: solid 2px #e2e5ed;
                &:first-child{
                    margin-top: 0px;
                }
                &.active, &:hover{
                    border: solid 2px #006bc2;
                }
                @media(min-width: 992px){
                    height: 58px;
                }
                @media(min-width: 1200px){
                    height: 98px;
                    margin-top: 16px;
                    margin-bottom: 16px;
                }
            }
        }
    }
    .carousel-item-description {
        display: flex;
        .item-counter {
            margin-top: 2px;
            margin-right: 12px;
            @media(min-width: 1200px){
                margin-right: 16px;
            }
        }
    }
}



.integrations-carousel-modal {
    z-index: 1081;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: scroll;
    .modal-container {
        width: 80vw;
        max-width: 1146px;
        min-width: 714px;
        min-height: 632px;
        background-color: white;
        margin-top: 104px;
        position: relative;

        .modal-info {
            .modal-info-header {
                .btn-close{
                    position: absolute;
                    top: 48px;
                    right: 48px;
                }
            }
            .modal-info-body:hover {
                .play-btn {
                    background-color: rgba(0, 0, 0, 0.4) !important;
                }
            }
            .modal-info-body {
                .modal-items {
                    display: grid;
                    grid-template-columns: 1fr;
                    grid-template-rows: 1fr;
                    .modal-item:not(.video-item){
                        border: 1px solid #e2e5ed;
                    }
                    .modal-item {
                        max-height: 540px;
                        max-width: 1026px;
                        grid-column: 1/-1;
                        grid-row: 1/-1;
                        img:not(.play-overlay) {
                            object-fit: contain;
                        }
                        .play-overlay {
                            z-index: 2;
                            cursor: pointer;
                        }
                        .play-btn {
                            z-index: 2;
                            width: 64px;
                            height: 64px;
                            background-color: rgba(0, 0, 0, 0.6);
                            border: none;
                            transition: all .3s linear;
                            .play-icon {
                                width: 0;
                                height: 0;
                                border-left: 15px solid transparent;
                                border-right: 15px solid transparent;
                                border-bottom: 30px solid rgba(255, 255, 255, 0.6);
                                transform: rotate(90deg);
                                left: 30%;
                            }
                        }
                    }
                }
                .modal-item-descriptions {
                    margin-top: 12px;
                    @media(min-width: 1200px){
                        margin-top: 16px;
                    }
                    .modal-item-description {
                        display: flex;
                        .item-counter {
                            margin-top: 3px;
                            margin-right: 12px;
                            @media(min-width: 1200px){
                                margin-right: 16px;
                            }
                        }
                    }
                }

            }
        }
        .modal-item-btns {
            margin-top: 28px;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 16px 12px;
            @media(min-width: 1200px){
                width: 75%;
                gap: 20px 16px;
            }
            button.modal-item-btn {
                width: 96px;
                height: 60px;
                background-repeat: no-repeat;
                background-size: cover;
                border: solid 2px #e2e5ed;
                &.active, &:hover{
                    border: solid 2px #006bc2;
                }
                @media(min-width: 1200px){
                    width: 120px;
                }
            }
        }
    }
}
