@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&family=Ubuntu&display=swap');

html {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: #f0f4f8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='152' height='152' viewBox='0 0 152 152'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='temple' fill='%23d9e2ec' fill-opacity='1'%3E%3Cpath d='M152 150v2H0v-2h28v-8H8v-20H0v-2h8V80h42v20h20v42H30v8h90v-8H80v-42h20V80h42v40h8V30h-8v40h-42V50H80V8h40V0h2v8h20v20h8V0h2v150zm-2 0v-28h-8v20h-20v8h28zM82 30v18h18V30H82zm20 18h20v20h18V30h-20V10H82v18h20v20zm0 2v18h18V50h-18zm20-22h18V10h-18v18zm-54 92v-18H50v18h18zm-20-18H28V82H10v38h20v20h38v-18H48v-20zm0-2V82H30v18h18zm-20 22H10v18h18v-18zm54 0v18h38v-20h20V82h-18v20h-20v20H82zm18-20H82v18h18v-18zm2-2h18V82h-18v18zm20 40v-18h18v18h-18zM30 0h-2v8H8v20H0v2h8v40h42V50h20V8H30V0zm20 48h18V30H50v18zm18-20H48v20H28v20H10V30h20V10h38v18zM30 50h18v18H30V50zm-2-40H10v18h18V10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");    font-family: 'Ubuntu', sans-serif;
    color: hsl(209, 61%, 16%);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}


.quote-container {
    width: auto;
    max-width: 960px;
    padding: 24px 32px;
    border-radius: 16px;
    background-color: #FFF;
    box-shadow: 0 12px 24px hsla(209, 61%, 16%, 0.16),  0 4px 8px hsla(209, 61%, 16%, 0.08);
}

.en-lang #new-quote::after {
    content: "New quote";
}

.en-lang #error-message::after {
    content: "Looks like we're out of quotes... Why don't you come back later?";
}

.en-lang #author.unknown::after {
    content: "Unknown";
}

.ru-lang #new-quote::after {
    content: "Ещё цитата";
}

.ru-lang #error-message::after {
    content: "Похоже, у нас закончились цитаты... Может, заглянете попозже?";
}

.ru-lang #author.unknown::after {
    content: "Источник неизвестен";
}

.quote-text {
    font-size: 3rem;
    font-weight: bold;
}

.long-quote {
    font-size: 2rem;
}

.fa-quote-left {
    font-size: 4rem; 
}

.long-quote-mark {
    font-size: 2.5rem;
}

.quote-author {
    margin-top: 16px;
    font-size: 2rem;
    font-weight: 400;
    font-family: 'Open Sans', sans-serif;
}

#error-message {
    margin-top: 16px;
    font-size: 1.0rem;
    font-weight: bold;
    font-family: 'Open Sans', sans-serif;
    color: hsl(330, 63%, 47%);
}

.button-container {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
}

button {
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    font-size: 1.5rem;
    height: 3rem;
    border: none;
    border-radius: 8px;
    color: hsl(185, 94%, 87%);
    background-color: hsl(209, 61%, 16%);
    outline: none;
    padding: 0.5rem 2.0rem;
    box-shadow: 0.125rem 0.125rem 0.25rem hsl(209, 28%, 39%), inset 0.125rem 0.125rem 0.25rem hsl(210, 22%, 49%);
}

button:hover {
    color: hsl(186, 100%, 94%);
    background-color: hsl(211, 39%, 23%);

}

button:active {
    transform: translate(0.125rem, 0.125rem);
    box-shadow: none;
}

.onoffswitch {
    text-align: left;
    position: relative; width: 6rem;
    -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}

.onoffswitch-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.onoffswitch-label {
    display: block; 
    overflow: hidden; 
    cursor: pointer;
    border: 2px solid hsl(209, 61%, 16%);;
    border-right-color: hsl(209, 28%, 39%); 
    border-bottom-color:hsl(209, 28%, 39%);
    border-radius: 8px;
}

.onoffswitch-inner {
    display: block; 
    width: 200%; 
    margin-left: -100%;
    transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
    display: block; 
    float: left; 
    width: 50%; 
    height: 3rem; 
    padding: 0; 
    line-height: 3rem;
    font-size: 1.5rem; 
    font-family:  'Ubuntu', sans-serif; 
    box-sizing: border-box;
    color: hsl(185, 94%, 87%);     
    background-color: hsl(209, 61%, 16%);
}

.onoffswitch-label:hover .onoffswitch-inner:before, 
.onoffswitch-label:hover .onoffswitch-inner:after {
    color: hsl(186, 100%, 94%);
    background-color: hsl(211, 39%, 23%);
}

.onoffswitch-inner:before {
    content: "En";
    padding-left: 10px;
}
.onoffswitch-inner:after {
    content: "Ru";
    padding-right: 10px;
    text-align: right;
}

.onoffswitch-switch {
    display: block; width: 42px; margin: 3px;
    background:hsl(210, 31%, 80%);
    position: absolute; top: 0; bottom: 0;
    right: 48px;
    box-shadow: inset 0.125rem 0.125rem 0.125rem hsl(212, 33%, 89%), 
                inset -0.125rem -0.125rem 0.125rem  hsl(209, 23%, 60%);
    border-radius: 8px;
    transition: all 0.3s ease-in 0s; 
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
    right: 0;
}

.loader {
    border-top: 16px solid hsl(211, 27%, 70%);
    border-right: 16px solid hsl(210, 31%, 80%);
    border-bottom: 16px solid hsl(212, 33%, 89%);
    border-left: 16px solid hsl(210, 36%, 96%);

    border-radius: 50%;
    width: 128px;
    height: 128px;
    animation: spin 2s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

/* Media Query: Tablet */
@media screen and (max-width: 960px) {
    .quote-container {
        margin: auto 12px;
    }

    .fa-quote-left {
        font-size: 2.5rem; 
    }

    .quote-text {
        font-size: 2.0rem;
    }

    .quote-author {
        font-size: 1.5rem;
    }

    button {
        padding: 0.25rem 1.0rem;
    }
}

@media screen and (max-width: 360px) {
    .en-lang #new-quote::after {
        content: "New"
    }
    .ru-lang #new-quote::after {
        content: "Ещё"
    }    
}