@import '../vars';

.safi-image-browser-wrap {
    position: absolute;
    top: 0;
    right: calc(100% + 1px);
    width: 300%;
    height: 100%;
    box-sizing: border-box;
    box-shadow: -20px 0px 30px 0px #1e1d1e80;

    @at-root .safi-image-browser {
        position: relative;
        display: flex;
        flex-direction: column;
        background-color: $col-dark-sidebar;
        padding: 16px 16px 32px 16px;
        width: 100%;

        @at-root .safi-ib-header {
            h3 {
                color: white;
                margin-top: 0;

                a {
                    color: $col-accent-light;

                    &:hover {
                        color: $col-accent;
                    }
                }
            }
        }

        .safi-ib-search-area {
            min-height: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            margin-bottom: 10px;

            @at-root #safi-unsplash-search {
                flex: 1;
                margin-bottom: 0;
                height: 30px;
                margin-right: 5px;
            }
        }

        .safi-ib-body {
            position: relative;
            overflow-y: scroll;
            height: 100%;

            // &::-webkit-scrollbar {
            //     width: 5px;
            //     height: 5px;
            // }

            // &::-webkit-scrollbar-thumb {
            //     background: #ffffff40;
            //     border-radius: 5px;
            // }

            // &::-webkit-scrollbar-thumb:hover {
            //     background: #ffffff80;
            // }

            // &::-webkit-scrollbar-track {
            //     background: $col-dark-sidebar;
            //     border-radius: 0px;
            //     // box-shadow: inset 7px 10px 12px #f0f0f0;
            // }
        }

        @at-root .safi-close {
            position: absolute;
            top: 0;
            right: 0;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }

    @at-root .safi-ib-thumb {
        cursor: zoom-in;

        .safi-ib-cta {
            position: absolute;
            padding: 8px 12px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(0, 0, 0, 0.5);
            border-radius: 8px;
            cursor: pointer;
            color: white;
            opacity: 0;
            transition: all .15s ease-in-out;

            &:hover {
                background-color: rgba(0, 0, 0);
            }
        }

        .safi-ib-thumb-author {
            position: absolute;
            background-color: rgba(0, 0, 0, 0.5);
            inset: auto 0 0 0;
            padding: 3px;
            font-size: 11px;
            // left: 8px;
            // right: 8px;
            // border-radius: 8px 8px 0 0;
            opacity: 0;
            transition: all .15s ease-in-out;

            >a {
                color: white;
                text-decoration: none;

                &:hover {
                    text-decoration: underline;
                }
            }
        }

        &:hover {
            .safi-ib-cta {
                opacity: 1;
            }

            .safi-ib-thumb-author {
                opacity: 1;
            }
        }
    }

    @at-root .overlay-ib {
        top: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10;
        pointer-events: none;
    }

    .safi-ib-pro-notice {
        // background-color: #ffffff10;
        background-color: $col-accent;

        border: 4px solid white;
        /* border-radius: 8px; */
        padding: 20px;
        font-size: 22px;
        line-height: 1.25;
        margin: 4px 0 10px 0;
    }
}