/*
    Created: 2025-04-10
    Author: Kārlis Grīnvalds
    Last edited: 2026-05-14
    Edited by: Kārlis Grīnvalds
*/

/* Default style for pages */

/* HTML body */
body {
    background-color: white;
    margin-top: 1rem;
}

/* Loading screen */
#Loader, #RequestWindow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#RequestWindow {
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
}
.loader-content {
    text-align: center;
    font-size: 20px;
    color: #333;
}
#RequestWindow>.loader-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Image viewer */
#ImageGallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.gallery-content {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#ViewImage {
    max-height: 80vh;
    max-width: 90vw;
    object-fit: contain;
}
.file-description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    text-align: left;
}
.file-description > a {
    font-size: 24px;
}
.fake-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

/* User profile container */
.user-profile {
    text-align: right;
    padding-right: 0.5rem;
}

/* Page layout */
.container {
    display: grid;
    grid-template-areas:
        "header"
        "main"
        "footer";
    grid-template-columns: 1fr;
    margin: auto;
    width: 80%;
}
.container > header {
    grid-area: header;
    height: 32px;
    padding-top: 1rem;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
    padding-bottom: 2px;
}
.container > div.main {
    grid-area: main;
    background-color: whitesmoke;
    border: solid 2px rgb(61, 105, 74);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}
.container > footer {
    grid-area: footer;
    padding-top: 2rem;
}

/* User action bar */
.action-bar {
    float: left;
    display: inline-flex;
    height: 100%;
}
.action-bar>a {
    padding: 0.5rem;
    margin-right: 0.1rem;
    padding-bottom: 3rem;
    border: solid 1px rgb(61, 105, 74);
    border-radius: 1px;
}
.action-bar a#DropDownBtn {
    text-decoration: none;
}
a#DropDownBtn:hover>div.dropdown-menu {
    display: block;
}
div.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: solid 1px rgb(61, 105, 74);
    min-width: 100px;
    z-index: 1;
    padding: 4px;
}

/* Search bar */
.search-bar {
    float: right;
    text-align: right;
    background-color: rgb(200, 200, 200);
    border: solid 1px rgb(200, 200, 200);
    border-radius: 6px;
    width: 300px;
    height: 100%;
    overflow: hidden;
}
.search-bar input {
    float: left;
    border: none;
    background-color: transparent;
    outline: none;
    width: 78%;
    height: 100%;
}
.search-bar button {
    height: 100%;
    width: 20%;
    border: none;
}

/* Error text */
.error-text {
    display: none;
    background-color: red;
    border: solid 2px darkred;
    color: white;
    padding: 2px;
}

/* Alert window */
.alert-content {
    display: none;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 300px;
    padding: 20px;
    background-color: white;
    border: 2px solid rgb(61, 105, 74);
    border-radius: 10px;
    text-align: center;
    align-items: center;
    justify-content: center;
}
.alert-icon {
    margin: auto;
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
}
.alert-icon.success {
    background: rgb(111, 187, 129);
}
.alert-icon.success::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 45px;
    border-right: 10px solid white;
    border-bottom: 10px solid white;
    transform: translate(-50%, -60%) rotate(45deg);
}
.alert-icon.error {
    background: rgb(220, 80, 80);
}
.alert-icon.error::before,
.alert-icon.error::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 50px;
    background: white;
}
.alert-icon.error::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.alert-icon.error::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.alert-content > p {
    font-size: 20px;
    margin: 0;
    margin-top: 1rem;
}
.alert-content > .fake-close-btn {
    position: absolute;
    top: 0;
    right: 1rem;
    font-size: 24px;
    color: rgb(80, 80, 80);
    cursor: pointer;
}