$facebook: #3b5998;
$twitter: #1da1f2;
$pinterest: #bd081c;
$linkedin: #0077b5;

.op3-element[data-op3-element-type="socialsharingitem"] {
    display: table;

    .op3-link {
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;

        &:hover {
            color: #fff;
            text-decoration: none;
        }

        &[href*="facebook.com"] {
            .op3-icon-container,
            [data-op3-background="overlay"]::before,
            [data-op3-background="overlay"]::after {
                background-color: $facebook;
            }
        }

        &[href*="twitter.com"] {
            .op3-icon-container,
            [data-op3-background="overlay"]::before,
            [data-op3-background="overlay"]::after {
                background-color: $twitter;
            }
        }

        &[href*="pinterest.com"] {
            .op3-icon-container,
            [data-op3-background="overlay"]::before,
            [data-op3-background="overlay"]::after {
                background-color: $pinterest;
            }
        }

        &[href*="linkedin.com"] {
            .op3-icon-container,
            [data-op3-background="overlay"]::before,
            [data-op3-background="overlay"]::after {
                background-color: $linkedin;
            }
        }

        .op3-icon {
            color: rgba(0, 0, 0, 0.2);
        }

        .op3-text {
            display: flex;
            margin: 0 auto;
            color: rgba(0, 0, 0, 0.2);
            transition-property: transform, color;

            p {
                margin-bottom: 0;
                display: flex;
                justify-content: center;
                align-items: center;
                color: inherit !important;  // color property targeted to .op3-text
            }
        }

        .op3-count {
            line-height: 1;
            margin-bottom: 0;
        }

        .op3-icon-container {
            display: flex;
            line-height: 1;
            border: 2px solid currentColor;

            &[data-op3-iconframe="none"] {
                border-color: transparent !important;
                background: transparent !important;
            }

            &[data-op3-iconframe="outline"] {
                background: transparent !important;
                border-color: currentColor;
                padding: 25px;
            }

            &[data-op3-iconframe="filled"] {
                border-color: currentColor;
                padding: 25px;
            }

            &[data-op3-iconshape="curved"] {
                border-radius: 10%;
            }

            &[data-op3-iconshape="circle"] {
                border-radius: 100%;
            }

            .op3-icon {
                font-size: 55px;
            }
        }
    }

    .op3-background-ancestor {
        z-index: 0;
        overflow: hidden;

        [data-op3-background="overlay"] {
            z-index: -1;
        }

        [data-op3-border] {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-style: solid;
            border-color: rgba(0, 0, 0, 0.2);
            border-width: 0;
            border-radius: inherit;
            pointer-events: none;
            box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.4);
        }
    }
}

// To satisfy Typography Control Panel we must use stronger
// CSS selector for socialsharingitem links.
#op3-designer-element .op3-element[data-op3-element-type="socialsharingitem"] a {
    font-weight: inherit;
    font-style: inherit;
    text-decoration: inherit;
    text-transform: inherit;
    text-shadow: inherit;
    color: inherit;
}
