:root {
    --vh: 100vh; /* Fallback for browsers that do not support env() */
    --vh: calc(var(--vh-safe-area-inset-bottom, 0px) + 100vh - env(safe-area-inset-bottom));

    --color-code-text: #333;
    --color-code-bg: rgba(0,0,0,0.12);
    --font-code: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier,
        monospace;

    /* Override sodastraw to match Electro document theme */
    --color-header-bg: #1B557C;
    --color-nav-button-bg-active: #1B557C;

}

html, body {
    height: var(--vh);
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

code {
    color: var(--color-code-text);
    background-color: var(--color-code-bg);
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 2px 5px;
    font-family: var(--font-code);
    font-size: 75%;
    border: none;
    border-radius: 0;
}

.workspace__body--login,
.workspace__body--logout,
.workspace__body--error,
.workspace__body--settings {
    justify-content: center;
    align-items: center;
    overflow-y: scroll;
    gap: var(--default-gap);
}

.workspace__body--admin {
    justify-content: flex-start;
    align-items: center;
    overflow-y: scroll;
    gap: var(--default-gap);
}

.workspace__body--notifications {
    justify-content: start;
    align-items: center;
    overflow-y: auto;
    overflow-x: auto;
    gap: 10px;
    background-color: #fff;
}
.mainstage__workspace:has(.workspace__body--notifications) {
    background-color: #fff;
}

#text-search{
    border: 1px solid #aaa;
}

.iframe-doc-instance {
    width: 100%;
    height: 100%;
    border: none;
    /* margin: 10px; */
    border: 1px solid rgb(97, 97, 97);
}

.button--document-number {
    min-width: 140px;
}

.button--become {
    min-width: 110px;
    border : 1px solid #aaa;
}

#button--help{
    margin-top: 25px;
}

.login-error-text {
    color: red;
    text-align: center;
    justify-content: center;
}

/* -----------------
 * Notifications
 * ----------------- */

.notifications-container-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
    /* background-color: papayawhip; */
}
.notifications-container-buttons button {
    height: 100%;
}

.container-notifications {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
    padding: 5px;
    /* background-color: lemonchiffon; */
}
.container-notifications-core {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ebebeb;
    /* padding: 5px, 0px; */
    /* background-color: skyblue; */
}

.notification {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: center;
    background-color: #ffffff;
    font-size: 16px;
    width: 100%;
    padding-right: 10px;
 }
.notification:first-child {
    /* border-top: 1px solid #aaa; */
    margin-top: 5px;
 }
.notification:last-child {
    margin-bottom: 5px;
 }

.notification-icon-container {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 55px;
    height: 45px;
    padding: 5px;
    /* background-color: #6ca5cb; */
 }
 .notification-read-status {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 0;
    width: 15px;
    height: 15px;
    text-align: center;
    /* background-color: orange; */
    white-space: nowrap;
 }
.notification-icon {
    flex-shrink: 0;
    flex-grow: 0;
    width: 35px;
    height: 35px;
    /* background-color: lime; */
 }
 .notification-icon--read {
    /* filter: saturate(0.1) brightness(1.8) */
    filter: grayscale(100%) opacity(0.5);
 }

.notification-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-content {
    flex-grow: 1;
    margin-left: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    color: #444;
    border-bottom: 1px solid #ebebeb;
    gap: 3px;
    padding-bottom: 5px;
}
.notification:last-child .notification-content {
    border-bottom: none;
}

.notification-content-row {
    flex-grow: 1;
    text-align: left;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 10px;
    margin-top: 5px;
}

.notification-title {
    font-weight: 600;
    color: #222222;
    /* background-color: orange; */
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notification-timestamp {
    font-size: 10px;
    text-align: right;
    color: #8c8c8c;
    /* background-color: lime; */
    flex-shrink: 0;
    white-space: nowrap;
}

.notification-text {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    /* white-space: pre-wrap; */
    white-space: normal;
}
.notification-username {
    color: #954ab1;
    font-weight: bold;
}
.warning-install-pwa {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #ffdb3b;
    color: #6a0000;
    padding: 8px;
}
.warning-install-pwa p {
    margin: 0;
}
.warning-install-pwa--show {
    display: flex
}

.button-subscribe--hidden,
.button-unsubscribe--hidden {
    display: none;
}

/* -----------------
 * Admin Panel
 * ----------------- */

.admin-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #ffc8c8;
    gap: 4px;
    padding: 5px;
    width: 100%;
}
.admin-panel--hidden {
    display: none;
}
.admin-console {
    background: #c4ddff;
    padding: 10px;
    font-family: monospace;
    height: 200px;
    /* max-width: 400px; */
    width: 100%;
    overflow-y: scroll;
}
.admin-console__message {
    color: #656565
}
.admin-console__message--error {
    color: #4b0000;
}
.admin-console__message--log {
    color: #000000;
}
