/*!
 * Copyright (c) 2014-present Cliqz GmbH. All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

.result.offer {
    background-color: #fff;

    .abstract {
        .thumbnail {
            height: 74px;
            width: 79px;
            padding-right: 5px;
        }

        .content {
            padding: 2px 0;

            .result {
                padding-left: 8px;
                padding-right: 5px;

                &.selected, &.selected:visited {
                    .title {
                        color: #fff;
                    }

                    .ad {
                        border-color: #fff;
                        color: rgba(255, 255, 255, 0.8);
                    }

                    .url,
                    .divider,
                    .description {
                        color: rgba(255, 255, 255, 0.8);
                    }
                }
            }

            .buttons {
                padding-top: 3px;
            }

            .promo-code {
                padding: 0 0 0 9px;
            }
        }
    }
}

.injected-offer {

    .wrapper {
        display: inline-block;
        position: relative;
        padding: 4px 6px 4px 8px;
        margin-top: 3px;
        margin-bottom: 6px;
        border-radius: 3px;
        box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.17);

        .thumbnail {
            display: inline-block;
            width: 45px;
            height: 45px;
            vertical-align: bottom;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .offer-content {
            display: inline-block;
            width: 550px;
            max-width: calc(100% - 55px);
            vertical-align: 3px;

            .offer-title {
                padding: 0;
                font-size: 0.833em;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-decoration: none;
                font-weight: 500;

                &:hover {
                    color: #0078CA;
                }
            }

            .offer-code {

                .non-selectable {
                    display: inline-block;
                    padding: 0 6px 0 0;
                    font-size: 0.833em;
                    color: #2385e7;
                    vertical-align: 3px;
                    text-decoration: none;
                    font-weight: 500;

                    &:hover {
                        color: #0078CA;
                    }
                }
            }

            .offer-description {
                display: inline-block;
                padding: 1px 0 0 0;
                color: #999999;
                font-size: 0.733em;
                line-height: 20px;
                vertical-align: 3px;
                text-decoration: none;
            }

            .ad-label {
                font-size: 0.733em;
                position: absolute;
                bottom: 5px;
                right: 8px;
                color: #999999;
            }
        }
    }
}

.result.promo-code {
    display: inline-block;
    padding: 1px 0 0 0;
    color: #999999;
    font-size: 0.733em;
    line-height: 20px;
    vertical-align: 3px;
    text-decoration: none;

    .tooltip, .tooltip-copied {
        display: none;
        float: none;
        vertical-align: text-bottom;

        background-color: #7e7e7e;
        border-radius: 2px;
        color: #fff;
        font-size: 9px;
        font-weight: 400;
        line-height: 1;
        padding: 2px 4px;
        text-align: center;
        text-transform: uppercase;
    }

    &:hover {
        .tooltip {
            display: inline-block;

            &:hover {
                display: none;
            }
        }
    }

    &.copied {
        .tooltip {
            display: none;
        }

        .tooltip-copied {
            display: inline-block;
        }
    }
}
