.container {
    display: flex;
    justify-content: center;
    padding-top: 0;
}

@media only screen and (max-width: 600px) {
    .container {
        width: 100%;
    }
}

.onscreen {
    align-items: center;
}

.nav-content {
    display: flex;
    gap: 10px;
    justify-content: center;
}

@media only screen and (max-width: 600px) {
    .nav-content {
        display: flex;
        gap: 10px;
    }
}

@media only screen and (min-width: 993px) {
    nav a.sidenav-trigger {
         display: block;
    }
}

div#introduction, div#preprocessing, div#flashcards, div#dictionaries, div#learning {
    width: 100%;
    min-height: 700px;
    padding-top: 40px;
}

@media only screen and (max-width: 600px) {
    div#introduction, div#preprocessing, div#flashcards, div#dictionaries, div#learning {
        min-height: 700px;
        padding-top: 16px;
    }
}

#preprocessing-form, #flashcard-form {
    width: 100%;
    margin: 0 auto;
}

.textarea-container textarea {
    padding-left: 60px!important;
    height: 502px!important;
    overflow-y: auto!important;
}

.select-wrapper input.select-dropdown {
    font-size: 14px;
}

.row-counter {
    pointer-events: none;
}

.switch label.truncate {
    height: 22px;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.collection-item .buttons .btn {
    flex: 1;
}

@media only screen and (min-width: 601px) {
    .buttons {
        flex-direction: row;
    }
}

@keyframes spinner {
    to {transform: rotate(360deg);}
}

.spinner:before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    border-top-color: #000000;
    animation: spinner .8s linear infinite;
}

a.modal-trigger {
    border-bottom: 1px dashed;
}

nav .input-field {
    padding-top: 19px;
}

nav .input-field .select-wrapper + label {
    top: -26px;
}

nav .select-wrapper input.select-dropdown, nav .select-wrapper input.select-dropdown:focus {
    border-bottom: none;
    margin-bottom: 0;
}

nav a > i.material-icons {
    color: rgba(0, 0, 0, 0.87);
}

footer {
    position: fixed;
    z-index: 10;
    width: 100%;
    bottom: 0;
}

footer .navbar-fixed nav.navbar {
    bottom: 0;
}

footer .container {
    height: 100%;
}

footer .tabs {
    height: 100%;
}

footer .tabs .tab {
    height: 100%;
}

footer .tabs .indicator {
    top: 0;
}

div#dictionaries .collection-item.new {
    position: relative;
    display: flex;
    border-top: 1px solid #e0e0e0;
}

div#dictionaries .collection-item.new .input-field {
    width: 100%;
}

div#dictionaries .collection-item.new .input-field input {
    /*margin-bottom: 0;*/
}

div#dictionaries .collection-header .secondary-content {
    position: absolute;
    right: 20px;
    top: 16px;
}

@media only screen and (max-width: 600px) {
    div#dictionaries #word-list .collection-header .secondary-content {
        position: relative;
        right: 0;
        top: 0;
    }

    div#dictionaries #word-list .collection-header {
        display: flex;
        gap: 10px;
    }

    div#dictionaries #word-list .collection-header h6 {
        margin-top: 4px;
        flex: 1;
    }
}

div#dictionaries .collection-item.new .secondary-content {
    position: absolute;
    right: 20px;
}

div#dictionaries .collection .secondary-content i {
    cursor: pointer;
}

div#dictionaries .collection .scrollable {
    height: 679px;
    overflow-y: auto;
}

@media only screen and (max-width: 600px) {
    div#dictionaries .collection .scrollable {
        height: auto;
        overflow-y: initial;
    }
}

.collection .collection-item.active .secondary-content {
    color: #26a69a!important;
}

.collection .collection-item {
    background-color: transparent!important;
}

.collection .collection-item.avatar.active {
    background-color: #eee!important;
    color: #26a69a;
}

.collection .collection-item.avatar p {
    padding-right: 60px;
}

.collection .collection-item.avatar a.modal-trigger {
    width: 42px;
    height: 42px;
    display: block;
    position: absolute;
    left: 15px;
    border-bottom: none;
}

.collection .collection-item.avatar a.modal-trigger .circle {
    left: 0;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-gallery::after {
    content: "";
    flex-grow: 999;
}

.image-gallery > li {
    height: 300px;
    cursor: pointer;
    position: relative;
    flex: 1 1 auto;
}

.image-gallery[data-component="choice"] {
    height: calc(100% - 64px);
    margin-bottom: 0;
}

.image-gallery[data-component="choice"]:after {
    display: none;
}

.image-gallery[data-component="choice"] > li {
    height: auto;
    flex: 1 1 calc((100% - 1rem) / 2);
}

.image-gallery li img, .image-gallery li a {
    object-fit: cover;
    width: 100%;
    height: 100%;
    vertical-align: middle;
    border-radius: 5px;
}

.image-gallery li a {
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-gallery li .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(57, 57, 57, 0.502);
    top: 0;
    left: 0;
    transform: scale(0);
    transition: all 0.2s 0.1s ease-in-out;
    color: #fff;
    border-radius: 5px;
    /* center overlay text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* hover */
.image-gallery li:hover .overlay {
    transform: scale(1);
}

#modal-select-word-image {
    max-height: 80%;
}

#modal-select-word-image .input-field input {
    padding-right: 50px;
    width: calc(100% - 3rem - 50px);
}

#modal-select-word-image .input-field button {
    position: absolute;
    right: 0;
    background: transparent;
}

#modal-select-word-image .modal-content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(80vh - 56px);
}

#modal-select-word-image .scrollable {
    overflow-y: auto;
    flex: 1;
    position: relative;
}

#modal-select-word-image [data-component="synonyms"] {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

@media only screen and (max-width: 600px) {
    #modal-select-word-image {
        max-height: 85%;
    }
}

.loader:before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    border-top-color: #000000;
    animation: spinner .8s linear infinite;
    z-index: 2;
}

.loader:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    top: 0;
    left: 0;
    transform: scale(1);
    transition: all 0.2s 0.1s ease-in-out;
    z-index: 1;
}

.row .col.collapsible-wrapper {
    position: relative;
    padding: 35px;
}

.row .col.collapsible-wrapper .collapsible {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    z-index: 1;
}

.row .col.collapsible-wrapper .collapsible .collapsible-body {
    background-color: #f4f4f4;
}

.card.horizontal .card-image {
    max-width: 30%!important;
}

.card.horizontal .card-image .badge {
    position: absolute;
    z-index: 1;
    margin: 0;
    min-width: auto;
    left: 10px;
    top: 10px;
    background-color: var(--background-device-shadow);
    border-radius: 50%;
    display: block;
    width: 24px;
    height: 24px;
    color: var(--line-primary);
}

.card.horizontal .card-content a[data-component="original"] {
    color: #009688;
    border-bottom: 1px dashed #009688;
    font-size: 32px;
}

.card.horizontal .card-content [data-component="input-field"] {
    margin-top: 24px;
}

.waves-effect {
    z-index: 0;
}

@media only screen and (max-width: 600px) {
    .card.horizontal {
        flex-direction: column;
    }

    .card.horizontal .card-image {
        max-width: 100%!important;
        height: 200px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f4f4f4;
    }

    .card.horizontal .card-image a[data-component="image-wrapper"] {
        border-bottom: none;
    }

    .card.horizontal .card-action {
        display: flex;
        gap: 10px;
    }

    .card.horizontal .card-content a[data-component="original"] {
        color: #009688;
        border-bottom: 1px dashed #009688;
    }

    .card .card-content .card-title {
        overflow: hidden;
    }

    #memorization .card.horizontal .card-content .buttons {
        flex-direction: row;
    }

    #memorization .card.horizontal .card-content .buttons .btn[data-component='check'] {
        font-size: 13px;
        flex: 1;
    }

    .card .card-action a:not(.btn):not(.btn-large):not(.btn-small):not(.btn-large):not(.btn-floating) {
        flex: 1;
        margin-right: 0;
        text-align: center;
    }
}

.icon-bounce {
    display: inline-block;
    position: relative;
    -moz-animation: bounce 1s infinite linear;
    -o-animation: bounce 1s infinite linear;
    -webkit-animation: bounce 1s infinite linear;
    animation: bounce 1s infinite linear;
}

@-webkit-keyframes bounce {
    0% { top: 0; }
    50% { top: -0.2em; }
    70% { top: -0.3em; }
    100% { top: 0; }
}
@-moz-keyframes bounce {
    0% { top: 0; }
    50% { top: -0.2em; }
    70% { top: -0.3em; }
    100% { top: 0; }
}
@-o-keyframes bounce {
    0% { top: 0; }
    50% { top: -0.2em; }
    70% { top: -0.3em; }
    100% { top: 0; }
}
@-ms-keyframes bounce {
    0% { top: 0; }
    50% { top: -0.2em; }
    70% { top: -0.3em; }
    100% { top: 0; }
}
@keyframes bounce {
    0% { top: 0; }
    50% { top: -0.2em; }
    70% { top: -0.3em; }
    100% { top: 0; }
}

.pulse {
    display: inline-block;
    -moz-animation: pulse 2s infinite linear;
    -o-animation: pulse 2s infinite linear;
    -webkit-animation: pulse 2s infinite linear;
    animation: pulse 2s infinite linear;
}

@-webkit-keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
@-moz-keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
@-o-keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
@-ms-keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}