@font-face {
    font-family: 'Monda';
    src: url('Monda.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --tooltip-color: #252525;
    --bg-color: #000000;
    --bar-color: #0f0f0f;
    --border-color: #333;
    --text-color: #f0f0f0;
    --box-color: #181818;
    --dialog-color: #181818;
    --btn-color: #252525;
    --btn-hover-color: #252525;
    --menu-color: #414141;
    --menu-text-color: #b4b4b4;
    --icon-color: #5a5a5a;
    --click-color: #e7d801;
}

:root.light {
    --tooltip-color: #dcdcdc;
    --bg-color: #f7f7f7;
    --bar-color: #eaeaea;
    --border-color: #b8b8b8;
    --text-color: #202020;
    --box-color: #e6e6e6;
    --dialog-color: #cccccc;
    --btn-color: #dcdcdc;
    --btn-hover-color: #dcdcdc;
    --menu-color: #858585;
    --menu-text-color: #383838;
    --icon-color: #aaaaaa;
    --click-color: #00aeff;
}

/* Splash screen */
div#briefcase-splash {
    background-color:var(--bg-color);
    position:fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width:100%;
    height:100%;
    top:0px;
    left:0px;
    z-index:1000;
}
div#briefcase-splash p {
    text-align: center;
    color: white;
    font-size: large;
    font-family: sans-serif;
}
div#briefcase-splash.hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.2s, opacity 0.2s linear;
}
div#briefcase-splash img {
    animation: throbber 1.5s infinite;
}
@keyframes throbber {
    0% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1.0);
    }
    100% {
        transform: scale(1.2);
    }
}

/************************* Toolkit styles *************************/

/* WARNING: Do not modify content between the @@ css:start @@ and
   @@ css:end @@ markers. */

/*@@ css:start @@*/
/**************************************************
 * toga_web 0.5.3 (legacy static CSS: toga.css)
 *************************************************/
/**********************************************************************
 * Main page
 **********************************************************************/

* {
    box-sizing: border-box;
    line-height: 1;
}

html, body {
    max-height: calc(100vh);
    margin: 0;
    background: var(--bg-color);
    font-family: 'Monda';
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

#app-placeholder {
    font-family: var(--sl-font-sans);
    font-size: var(--sl-font-size-medium);
}

/* If a custom element hasn't been defined yet, hide it from rendering */
:not(:defined) {
    visibility: hidden;
}

/**********************************************************************
 * Application header
 **********************************************************************/

header.toga {
    background-color: var(--sl-color-primary-800);
    color: var(--sl-color-neutral-50);
    display: flex;
    flex-direction: row;
    align-items: center;
}

/***** App branding logo **********************************************/

header.toga a.brand {
    margin: 8px 1em;
}

header.toga a.brand img {
    width: 32px;
}

header.toga nav {
    display: inline-block;
}

header.toga nav.menubar {
    flex-grow: 1;
    font-family: var(--sl-font-sans);
    font-size: var(--sl-font-size-large);
}

header.toga nav.menubar:last-of-type {
    flex-grow: 0;
    padding-right: 1em;
}

/***** Menubar ********************************************************/

header.toga nav.menubar .menu {
    color: var(--sl-color-neutral-200);
    padding: 0.5em;
}

header.toga nav.menubar .menu:hover {
    background-color: var(--sl-color-primary-700);
    color: var(--sl-color-primary-300);
}

header.toga nav.menubar .app {
    color: var(--sl-color-neutral-50);
    font-weight: var(--sl-font-weight-bold);
}

/**********************************************************************
 * Main window
 **********************************************************************/

main.toga.window {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

main.toga.window > .container {
    /* The immediate container descendents of the window must expand
       to fill the full width of the window. */
    flex-grow: 1 !important;
}

/**********************************************************************
 * Widgets
 **********************************************************************/

/***** All containers *************************************************/

.toga .container {
    display: flex;
}

/***** Label **********************************************************/
.toga .label {
    font-family: 'Monda';
}
/*@@ css:end @@*/


/**********************************************************************
 * Dialog
 **********************************************************************/

sl-dialog::part(panel) {
    color: var(--text-color);
    background: var(--dialog-color) !important;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

sl-dialog::part(close-button) {
    display: none;
}

sl-dialog::part(overlay) {
    background: rgba(0, 0, 0, 0.7) !important;
}

/**********************************************************************
 * Details
 **********************************************************************/

sl-details::part(base) {
    font-size: 14px;
    color: var(--text-color);
    background: var(--box-color);
    border-color: var(--border-color);
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/**********************************************************************
 * TextInput
 **********************************************************************/


sl-input::part(base) {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: none;
}

sl-input::part(input) {
    font-family: 'Monda';
    background: var(--bg-color);
    color: var(--text-color);
    border: none;
    outline: none !important;
    box-shadow: none !important;
}

sl-input::part(base):hover,
sl-input::part(base):focus-within {
    border-color: var(--click-color)
}

.prefix_icon {
    cursor: pointer;
    color: var(--text-color);
}

/**********************************************************************
 * Dropdown
 **********************************************************************/

sl-dropdown::part(panel) {
    margin-top: 25px;
    margin-right: 5px;
    border-radius: 5px;
    min-width: 160px;
    box-shadow: 0 4px 15px #00000070;
}

sl-dropdown {
    --sl-panel-background-color: var(--btn-color);
    --sl-panel-border-width: 1px;
    --sl-panel-border-color : var(--border-color);
}

sl-menu-item::part(base) {
    background: var(--btn-color);
    font-size: 13px;
    transition: background 0.2s;
}

sl-menu-item:hover::part(base) {
    background: var(--menu-color);
}

sl-menu-item::part(label) {
    color: var(--menu-text-color);
    font-weight: 500;
    transition: color 0.2s;
    font-family: 'Monda';
}

sl-menu-item:hover::part(label) {
    color: #ffffff;
}

sl-menu-item::part(prefix) {
    margin-right: 10px;
    font-size: 16px;
    color: var(--menu-text-color);
    transition: color 0.2s;
}

sl-menu-item:hover::part(prefix) {
    color: #ffffff;
}

#toga_dropdown_box {
    background: var(--btn-color);
    height: 80px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

/**********************************************************************
 * Button
 **********************************************************************/

sl-button::part(base) {
    background: var(--btn-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-family: 'Monda';
    font-size: 16px;
    transition: background 0.4s ease;
}

sl-button::part(prefix) {
    font-size: 20px;
    color: var(--icon-color);
    transition: color 0.2s;
}

sl-button:hover::part(base) {
    background: var(--btn-hover-color);
}

sl-button:hover::part(prefix) {
    color: var(--text-color);
}


/**********************************************************************
 * TitleBar
 **********************************************************************/

#toga_title_bar {
    background-color: var(--bar-color);
    height: 80px;
    display: flex;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
}

#toga_title_box {
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 80px;
}

#title_logo {
    display: flex;
    align-items: center;
    height: 100%;
    -webkit-user-drag: none;
}

#toga_search {
    height: 80px;
    width: 100%;
    max-width: 500px;
    min-width: 300px;
    align-items: center;
    padding: 10px;
    align-self: center;
}

#toga_search.hidden {
    display: none;
}

#toga_search_box {
    min-width: 450px;
    align-items: center;
}

#toga_search_box.hidden {
    display: none;
}

#toga_title_label {
    color: var(--text-color);
    margin-left: 20px;
    margin-right: 20px;
    font-size: 22px;
    letter-spacing: 0.08em;
    word-spacing: 0.25em;
}

#toga_title_label.hidden {
    display: none;
}

#toga_info_box {
    background: var(--bg-color);
    height: fit-content;
    width: fit-content;
    padding: 10px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    border: 1px solid var(--border-color);
    gap: 10px;
}

#status_icon {
    color: var(--icon-color);
    font-size: 16px;
}

@keyframes status-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#status_icon.active {
    animation: status-rotate 2s linear infinite;
}

#status_icon.off {
    color: #ff4747;
}

#status_icon.on {
    color: #2dff5a;
}

#height_icon,
#connections_icon {
    display: none;
    color: var(--icon-color);
    font-size: 16px;
}

#height_icon.hidden,
#connections_icon.hidden {
    display: block;
}

#toga_height_label,
#toga_connections_label {
    color: var(--text-color);
    font-size: 13px;
}

#toga_height_value,
#toga_connections_value {
    color: var(--text-color);
    font-size: 13px;
}

#toga_height_label.hidden,
#toga_connections_label.hidden {
    display: none;
}


/**********************************************************************
 * Pages
 **********************************************************************/

#toga_pages {
    background: var(--box-color);
    display: flex;
    flex: 1;
    height: 100%;
    width: 100%;
    padding: 5px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
    scrollbar-width: thin;
    scrollbar-color: var(--click-color) #22222200;
}

#toga_pages.mobile {
    max-height: calc(100vh - 160px);
    min-height: calc(100vh - 160px);
}

#toga_home_page,
#toga_broadcast_page,
#toga_documentation_page {
    display: none;
    background: var(--bar-color);
    height: 100%;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

#toga_home_page.active,
#toga_broadcast_page.active,
#toga_documentation_page.active {
    display: flex;
}

/**********************************************************************
 * Home
 **********************************************************************/

#toga_home_status_box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 10px;
    gap: 10px;
}

/* Tablet: 2x2 */
@media (max-width: 900px) {
    #toga_home_status_box {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 500px) {
    #toga_home_status_box {
        grid-template-columns: 1fr;
    }
}

#toga_home_height_box,
#toga_home_hashrate_box,
#toga_home_difficulty_box,
#toga_home_reward_box {
    height: 80px;
    background: var(--box-color);
    border-radius: 10px;
    border-bottom: 2px solid var(--border-color);
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

#toga_home_height_box:hover,
#toga_home_hashrate_box:hover,
#toga_home_difficulty_box:hover,
#toga_home_reward_box:hover {
    transform: translateY(-2px);
}

#toga_home_height_label,
#toga_home_hashrate_label,
#toga_home_difficulty_label,
#toga_home_reward_label {
    color: var(--text-color);
    font-size: 18px;
}

#toga_home_height_value,
#toga_home_hashrate_value,
#toga_home_difficulty_value,
#toga_home_reward_value {
    color: var(--text-color);
    font-size: 21px;
}

/**********************************************************************
 * Broadcast
 **********************************************************************/

#toga_broadcast_title_label {
    font-size: 20px;
    color: var(--text-color);
}

/**********************************************************************
 * Documentation
 **********************************************************************/

#toga_documentation_title_label {
    font-size: 20px;
    color: var(--text-color);
    padding: 10px;
}

#toga_documentation_box {
    margin-top: 25px;
    margin-left: 5px;
    padding: 5px;
}

.documentation_category_label {
    color: var(--text-color);
    font-family: 'Monda';
}

.documentation_title {
    color: var(--click-color);
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    width: fit-content;
    border-radius: 10px;
    user-select: text;
    -webkit-user-select: text;
}

.documentation_method {
    color: var(--menu-text-color);
    font-family: 'Monda';
    font-size: 14px;
    margin: 5px;
    user-select: text;
    -webkit-user-select: text;
}