/*
|--------------------------------------------------------------------------
| TOGGLE BUTTON
|--------------------------------------------------------------------------
*/

.ss-toggle {

    position: relative;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;

    cursor: pointer;

    z-index: 99;

    transition: .25s;
}

.ss-toggle:hover {

    transform: translateY(-3px);
}

/*
|--------------------------------------------------------------------------
| MODAL
|--------------------------------------------------------------------------
*/

.ss-modal {

    position: fixed;

    inset: 0;

    background: #fff;

    z-index: 9999999;

    opacity: 0;
    visibility: hidden;

    transform: translateY(30px);

    transition: .28s ease;

    display: flex;
    flex-direction: column;
}

.ss-modal.active {

    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.ss-header {

    padding: 16px;

    display: flex;

    align-items: center;

    gap: 12px;

    border-bottom: 1px solid #f3f3f3;

    flex-shrink: 0;

    background: #fff;
}

/*
|--------------------------------------------------------------------------
| INPUT
|--------------------------------------------------------------------------
*/

.ss-input-wrap {

    flex: 1;

    height: 52px;

    border-radius: 16px;

    background: #f5f5f5;

    display: flex;
    align-items: center;

    padding: 0 16px;

    gap: 12px;
}

.ss-input-wrap i {

    color: #888;

    font-size: 18px;
}

.ss-input {

    flex: 1;

    border: none;

    background: transparent;

    font-size: 15px;

    outline: none;
}

/*
|--------------------------------------------------------------------------
| IMAGE BUTTON
|--------------------------------------------------------------------------
*/

.ss-image-btn,
.ss-close {

    width: 50px;
    height: 50px;

    border-radius: 16px;

    border: none;

    background: #f5f5f5;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    cursor: pointer;

    color: #111;

    font-size: 18px;

    transition: .2s;
}

.ss-image-btn:hover,
.ss-close:hover {

    background: #111;

    color: #fff;
}

/*
|--------------------------------------------------------------------------
| BODY
|--------------------------------------------------------------------------
*/

.ss-body {

    flex: 1;

    overflow-y: auto;

    padding: 18px;
}

/*
|--------------------------------------------------------------------------
| TRENDING
|--------------------------------------------------------------------------
*/

.ss-trending h3 {

    margin: 0 0 14px;

    font-size: 20px;

    color: #111;
}

.ss-tags {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 26px;
}

.ss-tags span {

    padding: 10px 14px;

    border-radius: 999px;

    background: #f5f5f5;

    font-size: 13px;

    cursor: pointer;

    transition: .2s;
}

.ss-tags span:hover {

    background: #111;

    color: #fff;
}

/*
|--------------------------------------------------------------------------
| RESULTS
|--------------------------------------------------------------------------
*/

.ss-results {

    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 14px;
}

/*
|--------------------------------------------------------------------------
| CARD
|--------------------------------------------------------------------------
*/

.ss-card {

    background: #fff;

    border-radius: 20px;

    overflow: hidden;

    border: 1px solid #f3f3f3;

    text-decoration: none;

    transition: .25s;

    box-shadow:
        0 6px 18px rgba(0,0,0,.04);
}

.ss-card:hover {

    transform: translateY(-4px);

    box-shadow:
        0 14px 30px rgba(0,0,0,.08);
}

.ss-card img {

    width: 100%;

    aspect-ratio: 1/1;

    object-fit: cover;

    background: #fafafa;
}

/*
|--------------------------------------------------------------------------
| CONTENT
|--------------------------------------------------------------------------
*/

.ss-content {

    padding: 12px;
}

.ss-content h4 {

    margin: 0 0 10px;

    color: #111;

    font-size: 14px;

    line-height: 1.5;

    display: -webkit-box;

    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    min-height: 42px;
}

.ss-content span {

    color: #ff4d2d;

    font-size: 18px;

    font-weight: 700;
}

.ss-content del {

    color: #999;

    font-size: 13px;

    margin-right: 6px;
}

.ss-content ins {

    text-decoration: none;
}

/*
|--------------------------------------------------------------------------
| EMPTY
|--------------------------------------------------------------------------
*/

.ss-empty {

    grid-column: 1/-1;

    padding: 50px 20px;

    text-align: center;

    font-size: 16px;

    color: #777;
}

/*
|--------------------------------------------------------------------------
| LOADING
|--------------------------------------------------------------------------
*/

.ss-loading {

    grid-column: 1/-1;

    height: 180px;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            #f3f3f3 25%,
            #ececec 37%,
            #f3f3f3 63%
        );

    background-size: 400% 100%;

    animation:
        ssSkeleton 1s linear infinite;
}

@keyframes ssSkeleton {

    0% {

        background-position: 100% 50%;
    }

    100% {

        background-position: 0 50%;
    }
}

/*
|--------------------------------------------------------------------------
| SCROLLBAR
|--------------------------------------------------------------------------
*/

.ss-body::-webkit-scrollbar {

    width: 4px;
}

.ss-body::-webkit-scrollbar-thumb {

    background: rgba(0,0,0,.12);

    border-radius: 999px;
}

/*
|--------------------------------------------------------------------------
| PERFORMANCE
|--------------------------------------------------------------------------
*/

.ss-card,
.ss-modal,
.ss-toggle {

    will-change: transform;
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media(max-width:500px){

    .ss-results {

        grid-template-columns:
            repeat(2,1fr);

        gap: 12px;
    }

    .ss-toggle {

        width: 54px;
        height: 54px;
    }

    .ss-header {

        padding: 14px;
    }

    .ss-body {

        padding: 14px;
    }

}

/*
|--------------------------------------------------------------------------
| HISTORY
|--------------------------------------------------------------------------
*/

.ss-history {

    margin-bottom: 20px;
}

.ss-history-head {

    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.ss-history-head h3 {

    margin: 0;

    font-size: 18px;
}

.ss-clear-history {

    border: none;

    background: transparent;

    color: #ff4d2d;

    font-size: 13px;

    cursor: pointer;
}

.ss-history-list {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.ss-history-item {

    border: none;

    background: #f5f5f5;

    border-radius: 999px;

    padding: 10px 14px;

    display: flex;

    align-items: center;

    gap: 8px;

    cursor: pointer;

    font-size: 13px;

    transition: .2s;
}

.ss-history-item:hover {

    background: #111;

    color: #fff;
}
