/*
	WebPlotDigitizer - https://automeris.io/WebPlotDigitizer

	Copyright 2010-2021 Ankit Rohatgi <ankitrohatgi@hotmail.com>

	This file is part of WebPlotDigitizer.

    WebPlotDigitizer is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    WebPlotDigitizer is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with WebPlotDigitizer.  If not, see <http://www.gnu.org/licenses/>.
*/

:root {
    /* Light theme defaults */
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #f8fafc; /* slate-50 */
    --text: #0b1220; /* near-black */
    --muted: #4b5563; /* slate-600 */
    --accent: #4f46e5; /* indigo-600 */
    --accent-2: #6366f1; /* indigo-500 */
    --border: #e5e7eb; /* slate-200 */
    --ok: #16a34a;
    --warn: #ca8a04;
    --danger: #dc2626;
}

[data-theme="dark"] {
    --bg: #0b0b0c;
    --panel: #141418;
    --panel-2: #1b1b21;
    --text: #eaeaf0;
    --muted: #a2a2b3;
    --accent: #4f46e5;
    --accent-2: #6366f1;
    --border: #2a2a33;
    --ok: #16a34a;
    --warn: #ca8a04;
    --danger: #dc2626;
}

html {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font: 14px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

tr,
td {
    margin: 0;
    padding: 0;
}

#allContainer {
    width: 100%;
    height: 100%;
    margin-left: 5px;
}

#mainContainer {
    float: left;
}

/* Top bar */
#topContainer {
    width: 100%;
    height: 56px;
    border-bottom: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    align-items: center;
}

#menuButtonsContainer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    width: 100%;
}

#navbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
}

.brand {
    font-weight: 700;
    color: var(--text);
    margin-right: 8px;
    letter-spacing: 0.2px;
}

#topToolbarContainer { display: none; }

#graphicsContainer {
    overflow: auto;
    display: inline-block;
    background: var(--panel-2);
}

#sidebarContainer {
    float: right;
    width: 300px;
    height: 100%;
    background: var(--panel);
    border-left: 1px solid var(--border);
}

#bottomContainer {
    width: 100%;
    height: 40px;
    border-top: thin lightgrey solid;
}

#canvasDiv {
    height: 400px;
    /* temporary */
    width: 600px;
    /* temporary */
    background: var(--panel-2);
    padding: 0;
    margin: 0;
}

#mainCanvas {
    background: white;
}

#canvasDiv:hover {
    cursor: crosshair;
}

.canvasLayers {
    background: transparent;
    position: absolute;
    top: 0px;
    left: 0px;
}

.zoomLayers {
    border: 1px solid var(--border);
    margin: 0;
    padding: 0;
}

#zoomDiv {
    margin: 0px;
    margin-bottom: 5px;
    padding: 0px;
    width: 251px;
    text-align: center;
}

#cursorPosition {
    padding: 0px 0px;
    margin: 0;
    margin-top: -5px;
    background: var(--panel);
    width: 250px;
    top: 0px;
    font-size: 12px;
    text-align: center;
}

select, input[type="file"], input[type="text"], input[type="number"], button {
    font: inherit;
}

select, input[type="text"], input[type="number"], input[type="file"] {
    height: 32px;
    font-size: 13px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 6px;
    padding: 0 8px;
}

.btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-ghost {
    background: transparent;
    border-color: var(--border);
}

.standardToolbar {
    height: 25px;
    padding: 0 0px;
    margin: 0 0px;
}

.toolbar {
    padding: 0 10px;
    margin: 0;
    height: 25px;
    position: absolute;
    top: -15px;
    left: 5px;
    visibility: hidden;
    z-index: 4;
}

.toolbar p {
    padding: 0;
    margin: 0;
}

/* Popup windows */
.popupheading {
    font-size: 14px;
    text-align: left;
    cursor: move;
    background-color: var(--panel-2);
    color: var(--text);
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.popupwindow, .popup {
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.popupcontent { padding: 12px; }
.popupcontent p { margin: 6px 0; }

.popup-drag-mask {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 5000;
    display: none;
}

.sidebar-title {
    background: var(--panel-2);
    color: var(--text);
    padding: 2px;
}

.sidebar {
    padding: 0px 0px;
    margin: 0;
    background: var(--panel);
    width: 250px;
    display: none;
    font-size: 13px;
    overflow: auto;
}

.sidebar p {
    padding: 1px 0px 1px 1px;
    margin: 2px 1px 2px 1px;
    font-size: 13px;
}

.footnote {
    font-size: 10px;
}

.leftIndent {
    margin-left: 10px;
}

#zoom-settings-container {
    position: absolute;
    top: 5px;
    right: 20px;
    z-index: 3;
}

#zoom-settings-button {
    width: 20px;
    height: 20px;
    font-size: 14px;
    padding: 0px;
}

.colorOptionBox {
    display: inline-block;
    height: 20px;
    width: 20px;
    border: thin black solid;
    margin-left: 5px;
}

.largeColorBox {
    display: inline-block;
    height: 40px;
    width: 40px;
    border: thin black solid;
}

#wait {
    position: absolute;
    top: 0px;
    left: 300px;
    background: var(--panel-2);
    color: var(--text);
    width: 200px;
    margin: 0px;
    display: inline-block;
    padding: 0px;
    z-index: 100;
}

#wait p {
    margin: 3px;
    padding: 0px;
}

.i18n-string {
    display: none;
}

.sidebar-extras {
    border: thin lightgray solid;
    padding-top: 5px;
    display: none;
}

#bottomNavbarContainer {
    height: 100%;
}

#imageAndPageNavbar {
    height: 100%;
    display: flex;
    align-items: center;
}

#imageAndPageNavbar .paged {
    margin-left: 10px;
}

#imageAndPageNavbar .files {
    margin-left: 10px;
}

#navSeparator {
    height: 100%;
    margin: 0px 10px 0px 20px;
    border-left: 1px solid var(--border);
}

label {
    vertical-align: top;
}

/* Loading curtain */
#loadingCurtain {
    position:absolute;top:0;left:0;width:100%;height:100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.98));
    z-index:100;display:flex;justify-content:center;align-items:center;
    font-size: 16px; color: var(--muted);
}