/*
 * Copyright 2017 Tomás Lihuel Améndola
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.tmd-snackbar {
    position: fixed;
    bottom: 0;
    height: 48px;
    padding: 14px 24px;
    overflow: hidden;
    z-index: 6;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    align-items: center;
    visibility: hidden;
    -webkit-transition-property: all;
    -moz-transition-property: all;
    -ms-transition-property: all;
    -o-transition-property: all;
    transition-property: all;
    -webkit-transition-duration: 0.24s;
    -moz-transition-duration: 0.24s;
    -ms-transition-duration: 0.24s;
    -o-transition-duration: 0.24s;
    transition-duration: 0.24s;
    -webkit-transition-timing-function: initial;
    -moz-transition-timing-function: initial;
    -ms-transition-timing-function: initial;
    -o-transition-timing-function: initial;
    transition-timing-function: initial;
    -webkit-transition-delay: 0s;
    -moz-transition-delay: 0s;
    -ms-transition-delay: 0s;
    -o-transition-delay: 0s;
    transition-delay: 0s;
}

.tmd-snackbar:not(.tmd-snackbar_dark) {
    background-color: rgba(50, 50, 50, 1);
}

.tmd-snackbar.tmd-snackbar_dark {
    background-color: rgba(250, 250, 250, 1);
}

@media (max-width: 600px) {
    .tmd-snackbar {
        left: 0;
        right: 0;
        -webkit-transform: translateY(100.0%);
        -moz-transform: translateY(100.0%);
        -ms-transform: translateY(100.0%);
        -o-transform: translateY(100.0%);
        transform: translateY(100.0%);
    }

    .tmd-snackbar.tmd-snackbar_open {
        visibility: visible;
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        -ms-transform: translateY(0);
        -o-transform: translateY(0);
        transform: translateY(0);
    }
}

@media (min-width: 601px) {
    .tmd-snackbar {
        min-width: 288px;
        max-width: 568px;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
        border-radius: 2px;
    }

    .tmd-snackbar:not(.tmd-snackbar_left):not(.tmd-snackbar_right) {
        left: 50.0%;
        -webkit-transform: translate(-50.0%, 100.0%);
        -moz-transform: translate(-50.0%, 100.0%);
        -ms-transform: translate(-50.0%, 100.0%);
        -o-transform: translate(-50.0%, 100.0%);
        transform: translate(-50.0%, 100.0%);
    }

    .tmd-snackbar.tmd-snackbar_left {
        left: 24px;
        -webkit-transform: translateY(100.0%);
        -moz-transform: translateY(100.0%);
        -ms-transform: translateY(100.0%);
        -o-transform: translateY(100.0%);
        transform: translateY(100.0%);
    }

    .tmd-snackbar.tmd-snackbar_right {
        right: 24px;
        -webkit-transform: translateY(100.0%);
        -moz-transform: translateY(100.0%);
        -ms-transform: translateY(100.0%);
        -o-transform: translateY(100.0%);
        transform: translateY(100.0%);
    }

    .tmd-snackbar:not(.tmd-snackbar_left):not(.tmd-snackbar_right).tmd-snackbar_open {
        visibility: visible;
        -webkit-transform: translate(-50.0%, 0);
        -moz-transform: translate(-50.0%, 0);
        -ms-transform: translate(-50.0%, 0);
        -o-transform: translate(-50.0%, 0);
        transform: translate(-50.0%, 0);
    }

    .tmd-snackbar.tmd-snackbar_left.tmd-snackbar_open, .tmd-snackbar.tmd-snackbar_right.tmd-snackbar_open {
        visibility: visible;
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        -ms-transform: translateY(0);
        -o-transform: translateY(0);
        transform: translateY(0);
    }
}

.tmd-snackbar > .tmd-snackbar-text {
    position: relative;
    margin: 0;
    line-height: 20px;
    font-size: 14px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

.tmd-snackbar:not(.tmd-snackbar_dark) > .tmd-snackbar-text {
    color: rgba(255, 255, 255, 1);
}

.tmd-snackbar.tmd-snackbar_dark > .tmd-snackbar-text {
    color: var(--tmd-theme-text-primary-on-light);
}

.tmd-snackbar > .tmd-snackbar-action {
    position: relative;
    border: 0;
    padding: 0;
    margin: 0 0 0 24px;
    line-height: 22px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--tmd-theme-primary);
    background-color: transparent;
    cursor: pointer;
}