/*
 * ----------------------------------------------------------------------------
 * Normalize html.
 * -----------------------------------------------------------------------------
 */
*,
*::before,
*::after {
    box-sizing: border-box
}

* {
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    height: 100%;
}

body {
    height: 100%;
    min-height: 100vh;
    line-height: 1.5;
    font-family: system-ui, sans-serif
}

img,
picture,
video,
canvas,
svg {
    display: block;
}

input,
button,
textarea,
select {
    font: inherit
}

button {
    cursor: pointer;
    background: none;
    border: none
}

ul {
    list-style: none
}

a {
    text-decoration: none;
    color: inherit
}
:root {
    --app-bar-size: 42px;
    --app-bar-bg-color: #373737;

    /* Override QuickSign styles */
    --qs-document-bg-color: #222;
    --qs-wrap-bg-color: #333;
}

/*
 * -------------------------------------------------
 * Main app styles
 * -------------------------------------------------
 */
#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    background-color: var(--app-bar-bg-color);
}

/*
 * -------------------------------------------------
 * Top bar
 * -------------------------------------------------
 */
#app>.tbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--app-bar-size);
    background-color: var(--app-bar-bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
}

#app>.tbar>#brand>img {
    display: block;
    height: 12px;
}

#app>.tbar>div {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

#app>.tbar>div>div#zoom>input[type="range"] {
    -webkit-appearance: none;
    width: 70px;
    height: 8px;
    background: transparent;
    cursor: pointer;
    margin-right: 5px;
}

#app>.tbar>div>div#zoom>input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: #333;
    border-radius: 4px;
    border: 1px solid #444;
}

#app>.tbar>div>div#zoom>input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #666;
    margin-top: -2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

#app>.tbar>div>div#zoom>input[type="range"]::-webkit-slider-thumb:hover {
    background: #777;
    border-color: #888;
    transform: scale(1.1);
}

#app>.tbar>div>div#zoom>input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.2);
    background: #888;
}

#app>.tbar>div>div#zoom>input[type="range"]::-moz-range-track {
    height: 8px;
    background: #333;
    border-radius: 4px;
    border: 1px solid #444;
}

#app>.tbar>div>div#zoom>input[type="range"]::-moz-range-thumb {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #666;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

#app>.tbar>div>div#zoom>input[type="range"]::-moz-range-thumb:hover {
    background: #777;
    border-color: #888;
    transform: scale(1.1);
}

#app>.tbar>div>div#zoom>input[type="range"]::-moz-range-progress {
    background: #555;
    border-radius: 4px;
}

#app>.tbar>div>div#zoom>input[type="range"]:focus {
    outline: none;
}

#app>.tbar>div>div#zoom>input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(85, 85, 85, 0.3);
}

#app>.tbar>div>div#zoom>span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    user-select: none;
    color: #666;
}

#app>.tbar>div>div#zoom>button {
    border: 0;
    background-color: transparent;
    transition: ease-in-out .3s;
    color: #666;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    margin-left: 5px;
}

#app>.tbar>div>div#zoom>button:hover {
    color: #fff;
}

#app>.tbar>div>div#pages {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

#app>.tbar>div>div#pages>button {
    width: calc(var(--app-bar-size) - 20px);
    height: calc(var(--app-bar-size) - 20px);
    border-radius: 50%;
    border: 2px solid #666;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    color: #666;
    font-size: 8px;
    user-select: none;
    transition: ease-in-out 0.3s;
}

#app>.tbar>div>div#pages>button:hover {
    border-color: #fff;
    color: #fff;
}

#app>.tbar>div>div#pages>span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #666;
    user-select: none;
}

#app>.tbar>div>div#save>button {
    border: 0;
    border-radius: 4px;
    background-color: transparent;
    transition: ease-in-out .3s;
    color: #00abff;
    width: calc(var(--app-bar-size) - 10px);
    height: calc(var(--app-bar-size) - 10px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-right: 15px;
}

#app>.tbar>div>div#save>button:hover {
    background-color: #222;
    color: #fff;
}

/*
 * -------------------------------------------------
 * Left bar
 * -------------------------------------------------
 */
#app>.lbar {
    position: absolute;
    top: var(--app-bar-size);
    left: 0;
    width: var(--app-bar-size);
    height: calc(100% - var(--app-bar-size));
    background-color: var(--app-bar-bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-top: 2px solid #494949;
    padding-top: 15px;
}

#app>.lbar>button {
    border: 0;
    border-radius: 4px;
    background-color: transparent;
    transition: ease-in-out .3s;
    color: #fff;
    width: calc(var(--app-bar-size) - 10px);
    height: calc(var(--app-bar-size) - 10px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

#app>.lbar>button:last-child {
    margin-top: 20px;
}

#app>.lbar>button:hover,
#app>.lbar>button.active {
    background-color: #222;
    color: tomato;
}

#app>.lbar>button#form:hover,
#app>.lbar>button#form.active {
    color: #e1ff00;
}

#app>.lbar>button#text:hover,
#app>.lbar>button#text.active {
    color: #00ff55;
}

#app>.lbar>button#background:hover,
#app>.lbar>button#background.active {
    color: #56b3ff;
}

#app>.lbar>button#shape:hover,
#app>.lbar>button#shape.active {
    color: cyan;
}

#app>.lbar>button#qr:hover,
#app>.lbar>button#qr.active {
    color: #657cff;
}

#app>.lbar>button#stamp:hover,
#app>.lbar>button#stamp.active {
    color: #bf72ff;
}

#app>.lbar>button#signature:hover,
#app>.lbar>button#signature.active {
    color: #ff00b3;
}

#app>.lbar>#thumbs {
    margin-bottom: 15px;
}

/*
 * -------------------------------------------------
 * QuickSign app wrap
 * -------------------------------------------------
 */
#app>.qsapp {
    position: absolute;
    top: var(--app-bar-size);
    left: var(--app-bar-size);
    width: calc(100% - var(--app-bar-size));
    height: calc(100% - var(--app-bar-size));
    overflow: hidden;
}