/* GLOBAL */

html {
    font-size: 16px;
    box-sizing: border-box;
    height: -webkit-fill-available;
}
* {
    box-sizing: inherit;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    background-color: rgb(28, 33, 62);
    background-image: url('../images/art-deco-pattern-01.svg');
    background-repeat: repeat;
    background-size: 60px;
}

/* FONTS */

textarea,
.note-text,
.quote-text,
#copyright {
    font-family: lieberuth, sans-serif;
    font-weight: 400;
    font-style: normal;
}
#clipboard-confirmation,
#case-selection,
.options,
.confirmed,
h1 {
    font-family: typeka, sans-serif;
    font-weight: 400;
    font-style: normal;
}
#converter-text,
#see-more,
h2 {
    font-family: capitol, sans-serif;
    font-style: normal;
}

/* HEADER */

header {
    overflow: hidden;
}
#typewriter-banner {
    display: block;
    width: 30%;
    min-width: 270px;
    margin: 0 auto .5rem;
}

/* MAIN */

#clipboard-wrapper,
#icon-wrapper,
textarea {
    width: 50%;
}
#clipboard-wrapper,
#icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 auto;
}
#clipboard-wrapper {
    margin-top: 1rem;
}
#retoggle,
#nota-bene {
    display: none;
}
.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    width: 55px;
    border-radius: 100px;
    margin: 0;
    cursor: pointer;
}
/* prevent sticky hover, on mobile */
@media (hover:hover) {
    .icon:hover {
        filter: brightness(80%);
        background-color: rgb(19, 24, 56);
    }
}
.icon img {
    display: block;
    height: 35px;
}
#clipboard-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: fit-content;
    height: fit-content;
    background-color: rgb(189, 44, 0);
    border-radius: 4px;
    margin: 0 0 .5rem 0;
    visibility: hidden;
    z-index: 2;
}
#clipboard-notice::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    bottom: -7px;
    right: 23px;
    background-color: rgb(189, 44, 0);
    border-radius: 2px;
    transform: rotate(45deg);
}
#clipboard-confirmation {
    font-size: .8rem;
    color: rgb(255, 218, 185);
    padding: .7rem;
    margin: 0;
}
textarea {
    display: block;
    font-size: 1.5rem;
    letter-spacing: .05rem;
    color: rgb(82, 82, 82);
    background-color: rgb(236, 236, 236);
    caret-color: rgb(255, 87, 34);
    height: 160px;
    border: none;
    border-radius: 25px;
    padding: 1rem 1.5rem;
    margin: .5rem auto 2rem;
    resize: none;
}
textarea:focus {
    outline: 1px solid rgba(28, 33, 62, 0.14);
    box-shadow: 0px 0px 5px 4px rgb(90, 231, 189);
}
textarea::selection {
    background: rgba(255, 167, 38, 0.43);
}
.fade-in {
    -webkit-animation: fadeText 1.5s ease-in;
    animation: fadeText 1.5s ease-in;
}
@-webkit-keyframes fadeText {
    from {color: rgba(82, 82, 82, 0);}
    to {color: rgba(82, 82, 82, 1);}
}
@keyframes fadeText {
    from {color: rgba(82, 82, 82, 0);}
    to {color: rgba(82, 82, 82, 1);}
}
#converter-wrapper {
    display: flex;
    align-items: center;
    margin: 0 auto;
    max-width: fit-content;
}
#converter-text {
    font-weight: 600;
    font-size: 1.8rem;
    line-height: 1.5rem;
    color: rgb(255, 167, 38);
    margin: .625rem .625rem 0 0;
}
#selection-placeholder {
    display: inline-block;
    position: relative;
    border-bottom: 1px solid rgb(255, 167, 38);
}
#case-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 10rem;
    font-size: 1.3rem;
    line-height: 1.5rem;
    letter-spacing: .05rem;
    color: rgb(255, 218, 185);
    background-color: inherit;
    border: none;
    padding: 0 2px 2px 0;
    cursor: pointer;
}
#case-selection:focus {
    outline: none;
}
#arrow {
    display: inline-block;
    position: relative;
    border: solid rgb(255, 218, 185);
    border-width: 0 1px 1px 0;
    margin: 0 0 5px 0;
    padding: 4px;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transition-duration: 0.3s;
    cursor: pointer;
}
#dropdown {
    display: none;
    position: absolute;
    z-index: 1;
}
.options {
    font-size: 1.15rem;
    letter-spacing: .1rem;
    color: rgb(255, 218, 185);
    background-color: rgb(255, 87, 34);
    width: 10rem;
    margin: 0;
    padding: 1rem 1rem;
    border: none;
    cursor: pointer;
}
.options:active {
    background-color: rgb(189, 44, 0);
}
/* prevent sticky hover, on mobile */
@media (hover:hover) {
    .options:hover {
        background-color: rgb(189, 44, 0);
    }
}
#togglecase {
    margin-bottom: 4rem;
}
.confirmed {
    letter-spacing: .1rem;
}

/* AIRPLANE ANIMATION */

/* big, outbound plane */
#airplane-container {
    overflow-x: clip;
}
#airplane {
    display: none;
    width: 100px;
    margin: 1rem auto;
    position: relative;
    transform: rotate3d(1, 3, 5, 45deg);
    z-index: 2;
}
.flight {
    -webkit-animation: flying-plane 3s ease-in-out;
    animation: flying-plane 3s ease-in-out;
}
@-webkit-keyframes flying-plane {
    0% {transform: rotate3d(1, 3, 5, 45deg); left: 0px; top: 0px;}
    25% {transform: rotate3d(1, 3, 5, 22deg);}
    50% {transform: rotate3d(1, 3, 5, 6deg);}
    100% {transform: rotate3d(1, 3, 5, 1deg); left: 100%; top: 200px;}
}
@keyframes flying-plane {
    0% {transform: rotate3d(1, 3, 5, 45deg); left: 0px; top: 0px;}
    25% {transform: rotate3d(1, 3, 5, 22deg);}
    50% {transform: rotate3d(1, 3, 5, 6deg);}
    100% {transform: rotate3d(1, 3, 5, 1deg); left: 100%; top: 200px;}
}

/* little, inbound plane */
#incoming-airplane {
    position: relative;
    width: 50px;
    left: 100%;
}
.incoming-flight {
    -webkit-animation: fly-in 3s ease-in 1s;
    animation: fly-in 3s ease-in 1s;
}
@-webkit-keyframes fly-in {
    0% {transform: rotate3d(1, 3, 5, 40deg); left: 100%; top: 0;}
    25% {transform: rotate3d(1, 3, 5, 20deg);}
    50% {transform: rotate3d(1, 3, 5, 10deg);}
    100% {transform: rotate3d(1, 3, 5, 0deg); left: 50%; top: 10px;}
}
@keyframes fly-in {
    0% {transform: rotate3d(1, 3, 5, 40deg); left: 100%; top: 0;}
    25% {transform: rotate3d(1, 3, 5, 20deg);}
    50% {transform: rotate3d(1, 3, 5, 10deg);}
    100% {transform: rotate3d(1, 3, 5, 0deg); left: 50%; top: 10px;}
}

/* MODAL */

.modal {
    display: none;
    position: fixed;
    z-index: 4;
    padding-top: 7%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 20, 45, .7);
}
.popup {
    position: relative;
    background-image: url('../images/fish-scale-pattern.svg');
    background-repeat: repeat;
    background-size: 80px;
    margin: auto;
    padding: 2rem;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    width: 50%;
    max-width: 650px;
    -webkit-animation-name: drop-modal;
    -webkit-animation-duration: 0.4s;
    animation-name: drop-modal;
    animation-duration: 0.4s;
}
@-webkit-keyframes drop-modal {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1;}
}
@keyframes drop-modal {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1;}
}
#title-case-note {
    padding: 2rem;
    background-color: rgb(255, 247, 242);
}
#close-box {
    font-family: monospace;
    font-size: 1.5rem;
    font-style: normal;
    color: rgb(138, 32, 0);
    float: right;
    margin: 0;
    height: 35px;
    width: 35px;
    border: none;
    border-radius: 100%;
    background-color: inherit;
    cursor: pointer;

}
#close-box:hover {
    color: rgb(231, 131, 26);
    background-color: rgb(249, 234, 225);
}
h1 {
    font-size: 2rem;
    font-style: italic;
    color: rgb(189, 13, 13);
}
#note-text-wrapper {
    max-height: 310px;
    overflow: scroll;
}
.note-text,
.quote-text {
    font-size: 1.1rem;
    letter-spacing: .04rem;
    color: rgb(47, 47, 50);
}
.ital {
    font-style: italic;
}
#see-more {
    font-weight: bold;
    font-style: italic;
    white-space: nowrap;
    color: rgb(231, 131, 26);
    cursor: pointer;
}
#expanded-note-text {
    display: none;
}
h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(35, 35, 37);
    margin: 1.5rem 0 1rem 0;
}
table {
    padding-left: 1.5rem;
}
.quote-color {
    padding: .2rem;
    background-color: rgb(231, 131, 26);
}
.quote-text {
    padding-left: .5rem;
}
#phrases-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    margin: 0 auto;
}
#phrases-container > div {
    width: 35%;
    margin: 0 1.3rem;
}
.capitalized-phrase {
    text-transform: capitalize;
}
#chevron-wrapper {
    display: none;
    background-color: rgb(255, 247, 242);
    padding: 1rem 0;
}
#chevron-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 30px;
    border-radius: 100%;
    background-color: rgb(189, 13, 13);
    margin: 0 auto;
    cursor: pointer;
}
#chevron-bg:active {
    background-color: rgba(189, 13, 13, .6);
}
#chevron {
    width: 20px;
}
.rotated-chevron {
    transform: rotate(180deg) !important;
}

/* FOOTER */

footer {
    width: 100%;
    padding: .7rem 1rem;
    background-color: rgba(15, 20, 45, .5);
    position: fixed;
    bottom: 0;
}
#copyright {
    font-size: .8rem;
    color: rgba(255, 218, 185, .6);
    margin: 0;
}

/* MEDIA QUERIES */

@media only screen and (max-width: 1000px) {
    #clipboard-wrapper,
    #icon-wrapper,
    textarea {
        width: 65%;
    }
}

@media only screen and (max-width: 850px) {
    #phrases-container > div {
        width: 50%;
        flex-wrap: nowrap;
    }
    .split {
        margin-bottom: 0;
    }
}

@media only screen and (max-width: 440px) {

    /* MAIN */

    #clipboard-wrapper,
    #icon-wrapper,
    textarea {
        width: 80%;
    }
    textarea {
        font-size: 1.3rem;
    }
    #converter-text {
        font-size: 1.6rem;
    }

    /* MODAL */

    .popup {
        width: 90%;
    }
    #title-case-note {
        padding: 1.6rem;
    }
    h1 {
        margin: 1.5rem 0 1rem 0;
    }
    .note-text,
    .quote-text {
        font-size: 1rem;
    }
}

@media only screen and (max-width: 320px) {
    #icon-wrapper {
        margin: 1rem auto 0;
    }
    textarea {
        font-size: 1.1rem;
        height: 120px;
    }
    #converter-wrapper {
        flex-direction: column;
    }
    #converter-text {
        font-size: 1.6rem;
        margin: 0;
    }
    #copyright {
        font-size: .7rem;
    }
}
