:root {
    --cc: #006A6A;
    --ccshare: #006A6A;
}

@font-face {
    font-family: 'roboto';
    src: url('Roboto-Light.ttf');
}

@font-face {
    font-family: 'opensansi';
    src: url('OpenSans-Light.ttf');
    font-weight: bold;
}

@font-face {
    font-family: 'montserrat';
    src: url('Montserrat-VariableFont_wght.ttf');
    font-weight: normal;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    font-family: 'opensansi', sans-serif;
    border-color: var(--cc);
    color: whitesmoke;
    user-select: none;
    border-width: 2px;
    border-radius: 3px;
    outline: none;
}

body {
    background-color: black;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;

    display: flex;
    flex-direction: column;
    align-items: center;
    overscroll-behavior: contain;
}

#container {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1 {
    color: #686868;
    text-transform: uppercase;
}

textarea {
    resize: vertical;
    background: none;
    outline: none;
    font-size: 1rem;
    height: 10rem;
    transition: .05s;
    font-family: 'opensans', Courier, monospace;
    font-weight: light !important;
    padding: .25em;
    padding-left: .4em;
    padding-right: .4em;
}

#form_field_wrapper {
    border-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 30em;
    max-width: 95vw;
}

form fieldset:not(#form_field_wrapper) {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#form_field_wrapper fieldset {
    border-style: none;
}

#form_field_wrapper hr {
    border-style: none;
    width: 100%;
    height: 2px;
    background-color: var(--cc);
    padding: 0;
    margin: 0;
}

input {
    background: none;
    outline: none;
    border-style: solid;
    padding: .25em;
}

select,
option {
    background: #141314;
    color: white;
}

input,
textarea {
    border-style: solid
}

#lifetime {
    padding-left: .2em !important;
}
#uses {
    padding-left: .4em !important;
}

#token {
    border-left-style: none;
}

#token_icon_wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 50%;
    height: 2em !important;
}

#token_icon_wrapper #token {
    width: 100%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#use_token {
    display: none;
}

#use_token_label {
    cursor: pointer;
    user-select: none;
    border: solid 1px lightgray;
    position: relative;
    border-width: 2px !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    background-color: var(--cc);
    background-image: url('lock_open.svg') !important;
    background-repeat: no-repeat;
    padding: .4em;
}

#use_token_label:has(input:checked) {
    background-image: url('lock_closed.svg') !important;
}

#use_token_label:has(input:not(:checked)) + input {
    color: #6c6c6c;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

#file_spinner {
    animation: rotate 1s linear infinite;
    width: 2em;
    height: 2em;
    margin-left: auto;
    display: none;
}

/* formerly #submitBtn and #viewBtn */
.rr_button {
    background: var(--cc);
    border: solid 1px var(--cc);
    color: white;
    padding: .25em;
    user-select: none;
    transition: .12s ease-in-out;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    border-width: 2px;


}

#form_field_wrapper:disabled * {
    opacity: .70 !important;
    cursor: default !important;
}

@keyframes spinn {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#encSpinner {
    display: none;
    position: absolute;
    width: 2em;
    height: 2em;
    top: 50%;
    left: 50%;
    z-index: 99999;
    animation-name: spinn;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-direction: normal;
    animation-duration: 1s;
    filter: brightness(.5);
}

#submitBtn:disabled,
#submitBtn:disabled:hover {
    opacity: .4;
    cursor: default;
}

#uses,
#file_input,
#lifetime {
    width: 50%;
    border-color: lightgray;
}

/* share */

#share {
    width: 30em;
    max-width: 95vw;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#share legend,
#share fieldset {
    padding: .25em;
}

.key_fieldset {
    padding-top: 0 !important;
    margin-top: 1rem;
}

#share hr {
    width: 75%;
    height: 2px;
    margin: 1rem 0;
    border-style: none;
    background-color: lightgray;
    padding: 0;
}

#share fieldset {
    border-style: none;
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1rem;
}

#share input {
    width: 100%;
    border-color: var(--ccshare);
}

.shareset button {
    width: 75%;
}

.shareset button::before {
    content: '';
    background-image: url('')
}

#qrcode {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 150px;
    max-height: 150px;
}

.key_fieldset {
    border-style: none !important;
    border-top-style: solid !important;
    text-align: center;
    border-radius: 0 !important;
}

#share button,
.v_button {
    border: solid 1px var(--ccshare);
    background: var(--ccshare);
    color: #F5F5F5;
    padding: .25em;
    user-select: none;
    transition: .12s ease-in-out;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: none;
    border-width: 2px;
}

#share button:hover {
    opacity: .85;
}

#share_buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* gap: 1rem; */
}

#share_buttons button {
    width: 50%;
}

.rr_button:hover {
    background: var(--cc);
    opacity: .85
}



.copyBtn {
    font-size: .9rem !important;
}

#qrcode {
    position: relative;
}

#reveal_qr {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.123);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
}

#reveal_qr img {
    width: 2rem;
    height: 2rem;
}

#refreshButton {
    display: none;
    border-width: 2px;
    border-color: var(--cc);
    border-style: solid;
    background: transparent;
    padding: .25em;
    width: 100%;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 1rem;
}

#refreshButton:hover {
    background: var(--ccshare);
    transition: .12s ease-in-out;
}

#ember {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    user-select: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

html:has(.cDialog[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.obsolete {
    display: none !important;
}