@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-size: 16px;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
}

.container {
    position: relative;
    min-height: 100%;
    width: 100%;
    padding-bottom: 6rem;
    box-sizing: inherit;
}

.content {
    display: grid;
    grid-template-columns: 50% 50%;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 840px;
    padding: 20px;
    width: 100%;
    column-gap: 0.5rem;
    border-radius: 5px;
}

.container h1 {
    text-align: center;
    margin-bottom: 30px;
    grid-column: 1 / 3;
}

.select {
    grid-column: 1 / 3;
    width: fit-content;
    margin: 0 auto 10px auto;
    padding: 5px;
    font-size: 16px;
}

.input-text {
    position: relative;
    margin-right: 10px;
    width: 100%;
}

textarea {
    font-size: 14px;
    width: 100%;
    height: 171px;
    padding: 10px;
    resize: vertical;
    overflow: auto;
    border-radius: 5px;
}

.secondary-button {
    padding: 5px;
    font-size: 11px;
    position: absolute;
    background-color: #5784f5;
    color: #fff;
    border: none;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
}

/* .paste-button{
    top: 80%;
    right: 13%;
    display: none;
} */

.copy-button{
    top: 80%;
    right: 5%;
}

.input-text button:active,
.output-text button:active{
    background: #809ce2;
}

.copy-button::before,
.copy-button::before{
    content: "Copied";
    position: absolute;
    top: -160%;
    right: -74%;
    background: #5c81dc;
    padding: 8px 8px;
    border-radius: 10px;
    font-size: 1em;
    display: none;
}

.copy-button::after,
.copy-button::after{
    content: "";
    position: absolute;
    top: -60%;
    right: 24%;
    background: #5c81dc;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    display: none;
}

.input-text.active .copy-button::before,
.input-text.active .copy-button::after,
.output-text.active .copy-button::before,
.output-text.active .copy-button::after{
    display: block;
}

.error {
    grid-column: 1 / 3;
    text-align: center;
    margin-bottom: 10px;
    color: orange;
}

.button {
    display: flex;
    grid-column: 1 / 3;
    justify-content: center;
}

.button button,
.open-mobile button,
.convert-mobile button {
    margin: 0 10px;
    padding: 10px 20px;
    background-color: #3b71ca;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.button input,
.button label{
    display: none;
}

button:hover {
    box-shadow: 0 8px 9px -4px rgba(59,113,202,0.3),0 4px 18px 0 rgba(59,113,202,0.2);;
}

.error {
    grid-column: 1 / 3;
}

.error button {
    float: right;
}

a {
    text-decoration: none;
}

.output-text {
    position: relative;
    margin-right: 10px;
    width: 100%;
}

.output {
    font-size: 14px;
    position: relative;
    font-family: monospace;
    text-rendering: auto;
    color: fieldtext;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: start;
    appearance: auto;
    -webkit-rtl-ordering: logical;
    cursor: text;
    overflow-wrap: break-word;
    background-color: field;
    column-count: initial !important;
    margin: 0em;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(118, 118, 118) rgb(133, 133, 133);
    border-image: initial;
    padding: 10px;
    resize: vertical;
    overflow: auto;
    height: 171px;
    width: 100%;
    border-radius: 5px;
}

.open-mobile{
    display: none;
}

.convert-mobile{
    display: none;
}

div:empty:before {
    content: attr(data-placeholder);
    color: gray
}

#footer {
    position: absolute;
    background-color: #fff;
    justify-items: center;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    max-width: 840px;
    border-radius: 5px;
    width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#footer footer {
    padding: 10px 0 10px 0;
    width: 100%;
}

.text-center {
    text-align: center;
    margin-bottom: 10.5px;
}

a:hover {
    color: red;
}

a:visited {
    color: LinkText;
}

@media (max-width: 500px) {
    .content{
        padding: 0.5rem;
        grid-template-columns: calc(100% - 3.5rem) 3rem;
    }
    textarea,
    .output{
        height: 200px;
    }
    .output-text{
        grid-row: 5 / 6;
    }
    .button{
        display: inline;
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        text-align: center;
    }
    .button button{
        padding: 5px 10px;
        margin: 0 0 0.8rem;
        font-size: 11px;
        width: 100%;
    }
    .button input,
    .button label{
        display: inline;
    }
    .button #open{
        display: none;
    }
    .button #convert{
        display: none;
    }
    .open-mobile{
        display: inline;
        grid-column: 2 / 3;
        grid-row: 5 / 6;
    }
    .open-mobile button,
    .convert-mobile button{
        padding: 5px 10px;
        margin: 0 0 0.5rem;
        font-size: 11px;
        width: fit-content;
    }
    .convert-mobile{
        display: inline;
        grid-row: 4 / 5;
        margin: 0.4rem 0;
    }
    .convert-mobile button{
        font-size: 0.8em;
        float: right;
    }
    }
