// Buttons

// General Button Style

.btn {
    @extend %button-basic;

    &:not(.dropdown-toggle) {
        padding: 6px 12px;
        margin-right: 1px;
        margin-left: 1px;
    }

    &.active,
    &:active {
        box-shadow: none;
    }

    // Request Filters
    &[data-filter='request-result-movie'],
    &[data-filter='request-result-tv'],
    &[data-filter='request-result-music'] {
        @include button($theme, $theme-light, $theme-dark, $white);
    }

    &[data-filter='request-result-all'] {
        @include button($white25a, $white30a, $white20a, $white);
    }

    a {
        transition: none;
    }

    &.row {
        margin: 0 !important;
    }
}

// Badge (not really a button)
.badge {
    background-color: $theme;
}

// Info Button (Main Button)

.btn-info,
.bg-plex {
    @include button($theme, $theme-light, $theme-dark, $white);
}

// Outlined Button

.btn-outline {
    border-width: 2px;
}

// Close Button
.close-popup {
    background: $black50a;

    &.btn-circle {
        padding: 0;
        border-radius: 50%;
    }
}

// Large Button

.btn-lg {
    padding: 12px 30px;
}

// Button Icon

.btn-label {
    background: transparent;
    padding: 0;
    margin: 0 8px 0 0;
}

// Primary Button (For Organizr's style, secondary)

.btn-primary {
    @include button($white25a, $white30a, $white20a, $white);
}

.btn-outline {
    &.btn-primary {
        @include button($white25a, $white30a, $white20a, $white);
    }

    &.btn-warning {
        @include button($white25a, $white30a, $white20a, $white);
        border-radius: 1000px;
    }

    &.changeDefaultGroup,
    &.changeDefaultCategory {
        &.disabled {
            background: $white !important;
            color: $dark-gray !important;
        }
    }
}

div[id^='request']:not(#request-input-div) .dropdown-toggle {
    @include button($black50a);
    @extend %background-blur;
}

.btn-1b,
.btn-1c,
.btn-1d,
.btn-1e,
.btn-1f {
    .btn-primary:after {
        background: transparent;
    }
}

// Green Button

.btn-success {
    @include button($green, $color: $white);
}

// Red Button

.btn-danger {
    @include button($red, $color: $white);

    &.btn-outline {
        @include button($red, $color: $white);
        border-radius: 1000px;
    }
}

// Large Table Row Button

.btn-circle.btn-lg {
    padding: 10px;
    font-size: 18px;
}

// Media Info Pane Buttons

.btn-youtube {
    @include button(#f00);
}

.btn-youtube,
.bg-emby,
.bg-plex {
    color: $white70a !important;
    padding: 15.5px 16px !important;

    &:focus,
    &:hover {
        color: $white !important;
    }
}

// MCE Buttons

.mce-btn {
    @include button($white25a, $white30a, $white20a, $white);

    button {
        color: $white !important;
    }

    .mce-open {
        border: 0 !important;
    }
}

.mce-ico {
    color: $white !important;
}

.mce-caret {
    border-top-color: $white !important;
}

.mce-menubar .mce-menubtn {
    background: transparent !important;
    border: 0 !important;
    border-radius: 3px;
    text-shadow: none !important;

    button {
        color: $text-muted !important;
    }

    .mce-caret {
        border-top-color: $text-muted !important;
    }

    &:active,
    &.mce-active,
    &:hover {
        background: transparent !important;

        button {
            color: $white !important;
        }

        .mce-caret {
            border-top-color: $white !important;
        }
    }
}

// Button Groups

.btn-group {
    .btn {
        &:not(.dropdown-toggle):not(:only-child) {
            margin-right: 0;
            border-radius: 0 !important;
        }

        &:first-child:not(:last-child) {
            border-right-width: 0 !important;
            border-radius: 3px 0 0 3px !important;
        }

        &:last-child:not(:first-child) {
            border-left-width: 0 !important;
            border-radius: 0 3px 3px 0 !important;
        }

        &.btn-outline.dropdown-toggle {
            border-radius: 3px !important;
        }
    }

    &.open .dropdown-toggle {
        text-shadow: none;
        box-shadow: none;
    }
}

// List Group Item

button.list-group-item {
    color: $white70a !important;
}

// Navigation Tabs

.customtab2 {
    padding: 0;
}

.nav-tab {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.mailbox-widget .customtab li {
    &:hover a {
        opacity: 1;
    }
}

.nav-tabs {
    border: 0;

    li {
        a {
            background: $black15a;
            color: $text-muted !important;
            margin: 0;
            transition: none;

            &:focus,
            &:hover {
                background: $white08a !important;
                color: $text !important;
            }
        }

        &.active a {
            background: transparent !important;
            color: #eee !important;
            border: 0;
            cursor: pointer;

            &:focus,
            &:hover {
                background: $white08a;
                color: $theme-lighter !important;
                border: 0;
                cursor: pointer;
            }
        }
    }
}
