/* ****************************************************************************
 * COMPONENTS: NOTICES
 */

@import "../common/variables";
@import "../common/mixins";

/**
 * Notices based on .sui-box element.
 * @since 2.6.0
 */

.wpmud .sui-wrap .sui-row-with-sidenav>.sui-box.wphb-box-notice {
    display: flex;
    margin-bottom: 30px !important;
    box-shadow: inset 2px 0 0 0 #17A8E3, 0 2px 0 0 #DDDDDD;

    @include bp(phone) {
        display: flex;
        align-items: center;

        .sui-summary-sub {
            text-align: left;
        }
    }

    &.wphb-notice-upsell {
        box-shadow: inset 2px 0 0 0 #8D00B1, 0 2px 0 0 #DDDDDD;
    }

    &.sui-unbranded .sui-summary-segment {
        margin-left: 10px;
    }

    .wphb-dismiss-icon {
        position: absolute;
        top: 20px;
        right: 20px;
    }
}

.wpmud .wrap-wp-hummingbird .notice {
    margin: 15px 0 0;
    order: 10;
    width: 100%;
}

.wpmud .wrap-wp-hummingbird>.wphb-notice:not(.notice) {
    width: 600px;
    box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.15);
    border-radius: 0 0 5px 5px;
    padding: 10px 30px;
    position: absolute !important;
    z-index: 100;
    left: 50%;
    margin-left: -300px;
    top: 0;
}

.wpmud .wphb-notice:not(.notice) {
    border-radius: 5px;
    color: #333;
    font-family: $font;
    font-size: 15px;
    font-weight: 400;
    line-height: 18px;
    padding: 15px 30px;
    position: relative;
    width: 100%;
}

.wphb-notice {
    &.notice-info {
        padding-right: 38px;
        position: relative;

        #wphb-incompat-plugin-list {
            margin-bottom: 15px;
            margin-left: 0;
            padding-left: 2px;
        }

        a#wphb-manage-plugins {
            margin-bottom: 5px;
        }

        .wphb-dismiss-cta {
            color: #888;
            margin-left: 10px;
            text-decoration: none;
        }
    }

    &.notice p {
        font-size: 14px;
        line-height: 1.5;
        margin: 10px 0;
    }

    &.notice-free-rated {
        border-left-color: #2271B1;

        a {
            display: flex;
            width: 117px;
            height: 24px;
            opacity: 1;
            border-width: 1px;
            padding-right: 10px;
            padding-left: 10px;
            border-radius: 2px;
            font-weight: 400;
            font-size: 11px;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .wphb-rate-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;

            a {
                color: #007CBA;

                &.sui-button-blue {
                    background-color: #007CBA;
                    color: white;
                }

                &.sui-button-ghost {
                    border: 1px solid #007CBA;
                    color: #007CBA;
                    background: transparent;
                }

            }
        }

        p {
            color: #333;
            font-family: Roboto;
            font-weight: 400;
            font-size: 13px;
            line-height: 20px;
            letter-spacing: -0.25px;
            padding: 0;
        }
    }

    &.notice-perf-rate {
        border-color: #DDDDDD;
        border-left: 3px solid #1E8CBE;

        .sui-notice-message {
            display: flex;
            gap: 20px;
            padding-left: 8px;

            .wphb-rate-image {
                opacity: 1;
                padding: 10px;
                border-radius: 28px;
                box-shadow: 0px 0.82px 12.35px 0px #00000024;
                height: fit-content;
                margin-top: 12px;

                .sui-image {
                    max-width: 64px;
                    margin: 0;
                    vertical-align: middle;
                }
            }

            h3 {
                font-family: Roboto;
                font-weight: 700;
                font-size: 15px;
                line-height: 100%;
                margin-top: 12px;
                margin-bottom: 5px;

                span {
                    margin-right: 3px;
                }
            }
        }
    }

}

.wpmud .wphb-notice:not(.notice) p,
.wpmud .wphb-notice:not(.notice) span,
.wpmud .wphb-notice ul,
.wpmud .wphb-notice strong {
    margin: 0 0 10px -30px;
    padding: 0 0 0 30px;
}

.wpmud .wphb-notice:not(.notice) p:last-of-type {
    margin: 0;
}

.wpmud .wphb-notice.can-close .close {
    cursor: pointer;
    color: #333333;
    font-size: 12px;
    font-weight: bold;
    line-height: 36px;
    margin-left: 0;
    opacity: 0.5;
    text-transform: uppercase;
}

.wpmud .wphb-heading-status-green {
    color: #1ABC9C;
}

.wpmud .wphb-heading-status {
    font-family: $font--alt;
    font-size: 30px;
    margin-top: 0;
}

/* Overwrite for clear cache notice additional info link */
.wpmud .wphb-notice p>a {
    font-weight: 400;
}

.wpmud {

    .notice-connect-for-site-monitoring {
        .wphb-wrapper {
            display: flex;
            align-items: center;
            margin-right: 50px;
            margin-bottom: 5px;

            .sui-image {
                max-width: 65px;
                margin-right: 47px;
                margin-left: 37px;
            }
        }
    }

    #wrap-wphb-configs {
        .sui-notice-upsell {
            .sui-notice-content {
                box-shadow: inset 2px 0 0 0 #0059FF, inset 0 0 0 1px #E6E6E6;

                .sui-notice-icon {
                    color: #0059FF;
                }

                .sui-button-purple {
                    background-color: #0059FF;
                    border-color: #0059FF;

                    &:hover {
                        background-color: darken(#0059FF, 10%);
                        border-color: darken(#0059FF, 10%);
                    }
                }
            }
        }
    }
}

@include bp(tablet) {
    .wpmud .wrap-wp-hummingbird>.wphb-notice {
        width: 85%;
    }
}

@include bp(phone-large) {
    .wpmud .wrap-wp-hummingbird>.wphb-notice {
        width: 100%;
        top: 46px;
        margin-left: -251px;
    }
}

@include bp(phone) {
    .wpmud .wphb-notice:not(.notice) {
        padding: 15px 20px;
    }

    .wpmud .notice-connect-for-site-monitoring .wphb-wrapper {
        margin-right: 5px;
        display: block;
    }
}