@import '../../styles/variables';
@import './variables';

.thumbnail-card {
    display: flex;
    flex: 1 0 $thumbnail-card-min-width;
    flex-direction: column;
    min-width: $thumbnail-card-min-width;
    max-width: $thumbnail-card-max-width;
    height: 200px;
    border: $thumbnail-card-border solid $bdl-gray-10;
    border-radius: $bdl-border-radius-size-large;
    box-shadow: 0 5px 10px 0 rgb(198 198 198 / 20%);
}

// We should apply border to the card only when it is hovered
.thumbnail-card.is-highlight-applied {
    &:hover:not(:focus) {
        border: 1px solid $bdl-light-blue;
    }
}

.thumbnail-card-details {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 0 12px;
    line-height: 16px;
    border-top: 1px solid $bdl-gray-05;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;

    .thumbnail-card-details-content {
        display: flex;
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;

        .ThumbnailCardDetails-bodyText {
            width: 110px;
        }
    }

    .thumbnail-card-title,
    .thumbnail-card-subtitle {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .thumbnail-card-subtitle {
        color: $bdl-gray-65;
    }
}

.thumbnail-card-thumbnail-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: $thumbnail-height;
    background-color: $bdl-gray-05;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;

    .thumbnail-card-thumbnail-viewport {
        position: relative;
        width: 100%;
        height: $thumbnail-height;
        max-height: $thumbnail-height;
        overflow: hidden;
        text-align: center;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;

        img,
        svg {
            max-width: 100%;
            max-height: $thumbnail-height;
            vertical-align: middle;
        }

        img {
            box-shadow: 0 0 8px 0 rgb(177 177 177 / 50%);
        }
    }
}
