:root {
    --sg-calvoerde-top-navbar-height: 88px;
}

*, p {
    margin: unset;
    padding: unset;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

p, a, label, input, textarea {
    color: var(--sg-calvoerde-on-background-color);
}

input:focus, textarea:focus {
    outline: none;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    background-color: var(--sg-calvoerde-background-color);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

footer {
    border-top: 1px solid var(--sg-calvoerde-region-separator-color) !important
}

nav .container-fluid, .region, footer .footer-container {
    max-width: 2000px;
    margin-left: 12.5%;
    margin-right: 12.5%;
}

@media (min-width: 2000px) {
    nav .container-fluid, .region, footer .footer-container {
        width: 2000px !important;
        max-width: unset;
        margin-left: auto;
        margin-right: auto;
    }
}

#sg-emblem {
    position: absolute;
    top: 8px;
}

#user-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid white;
    color: white;
    margin-right: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.125s linear;
}

#user-profile:hover {
    background-color: #c7cbce5c;
}

/* ---------------- custom regions ---------------- */

.region {
    border-top: 4px solid var(--sg-calvoerde-region-separator-color) !important;
    margin-top: 16px;
    padding: 16px 16px 0 16px;
}

.region .header {
    font-size: 20px;
    padding-bottom: 4px;
}

.region .header.h2 {
    font-size: 16px;
}

.region .header.h3 {
    font-size: 14px;
    font-style: italic;
}

/* ---------------- custom regions ---------------- */

/* ---------------- link button ---------------- */

.link-button {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin: 16px 0 0 0px;
    padding: 8px 16px;
    transition: 0.125s linear;
    cursor: pointer;
    border-radius: 8px;
    background-color: var(--sg-calvoerde-red);
}

.link-button p, .link-button svg {
    color: white;
}

.link-button:hover {
    background-color: #cb0018;
}

/* ---------------- link button end ---------------- */

.center-elements {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 972px) {
    nav .container-fluid, .region, footer div {
        margin-left: unset !important;
        margin-right: unset !important;
    }
}

/* ---------------- sidebar ---------------- */

/* Sidebar styling */
.sidebar {
    z-index: 101;
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sg-calvoerde-background-color);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

.sidebar a:nth-child(2) {
    margin-top: 16px;
}

.sidebar a {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 18px;
    color: var(--sg-calvoerde-on-background-color);
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: var(--sg-calvoerde-a-hover);
}

.sidebar .closebtn {
    position: absolute;
    width: 100%;
    border-bottom: 1px solid var(--sg-calvoerde-region-separator-color);
    top: 0;
    padding: 8px 16px;
    font-size: 36px;
}

/* Burger button styling */
.burger-btn {
    font-size: 30px;
    cursor: pointer;
    color: white;
    display: none;
    margin-right: 16px;
}

@media (max-width: 684px) {
    .burger-btn {
        display: block;
    }

    #sg-emblem {
        margin-left: 64px;
    }

    #navbarNav {
        display: none !important;
    }
}

/* ---------------- sidebar end ---------------- */

/* ---------------- table design ---------------- */

.custom-table {
    color: var(--sg-calvoerde-on-background-color);
    border-collapse: collapse;
    width: 100%;
}

.custom-table td, .custom-table th {
    border-bottom: 1px solid var(--sg-calvoerde-background-darker-color);
    padding: 8px;
}

.custom-table tr {
    transition: 0.125s linear;
}

.custom-table tr:nth-child(odd) {
    background-color: #e3001b33;
}

.custom-table tr:hover {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.custom-table th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: var(--sg-calvoerde-red);
    color: white;
}

/* ---------------- table design end ---------------- */

/* ---------------- 1 to 1 row ---------------- */

.row-1-1 {
    display: flex;
    gap: 16px;
}

.row-1-1 .container-1-1:nth-child(1) {
    flex: 1;
}

.row-1-1 .container-1-1:nth-child(2) {
    flex: 1;
}

.row-1-1 .container-1-1 .child-1-1 {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    padding: 16px;
    gap: 16px;
    color: white;
    background-color: var(--sg-calvoerde-background-color);
    box-shadow: var(--sg-calvoerde-shadow);
}

@media (max-width: 720px) {
    .row-1-1 {
        flex-wrap: wrap;
        gap: unset;
    }

    .row-1-1 .container-1-1:nth-child(1),
    .row-1-1 .container-1-1:nth-child(2) {
        flex: unset;
        width: 100%;
    }
}

/* ---------------- 1 to 1 row end ---------------- */

/* ---------------- 2 to 1 row ---------------- */

.row-2-1 {
    display: flex;
    gap: 16px;
}

.row-2-1 .container-2-1:nth-child(1) {
    flex: 2;
}

.row-2-1 .container-2-1:nth-child(2) {
    flex: 1;
}

.row-2-1 .container-2-1 .child-2-1 {
    margin-top: 16px;
    min-height: 168px;
    display: flex;
    flex-wrap: wrap;
    padding: 16px;
    gap: 16px;
    color: white;
    background-color: var(--sg-calvoerde-background-color);
    box-shadow: var(--sg-calvoerde-shadow);
}

.row-2-1 .container-2-1 .child-2-1.no-container-outline {
    padding: unset;
    box-shadow: unset;
    min-height: unset;
}

.row-2-1 .container-2-1 .child-2-1 a div > p {
    color: white;
}

.event-content-container > p:nth-child(n) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 720px) {
    .row-2-1 {
        flex-wrap: wrap;
        gap: unset;
    }

    .row-2-1 .container-2-1:nth-child(1),
    .row-2-1 .container-2-1:nth-child(2) {
        flex: unset;
        width: 100%;
    }
}

/* ---------------- 2 to 1 row end ---------------- */

/* ---------------- container ---------------- */

.sh-container {
    margin-top: 16px;
    padding: 16px;
    background-color: var(--sg-calvoerde-background-color);
    box-shadow: var(--sg-calvoerde-shadow);
}

.sh-container.add {
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    border-radius: 8px;
    border: 1px dashed var(--sg-calvoerde-on-background-color);
    color: var(--sg-calvoerde-on-background-color);
    transition: 0.125s linear;
}

.sh-container.add:hover {
    background-color: var(--sg-calvoerde-table-row-hover);
}

/* ---------------- container end ---------------- */

#theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    border: 1px solid var(--sg-calvoerde-on-background-color);
    padding: 8px;
    width: fit-content;
    border-radius: 4px;
    color: var(--sg-calvoerde-on-background-color);
    cursor: pointer;
    transition: 0.125s linear;
}

#theme-switcher:hover {
    background-color: var(--sg-calvoerde-region-separator-color);
}

.note {
    border-left: 4px solid #9f99ff;
}

/* ---------------- form ---------------- */

.form-group {
    margin-bottom: 15px;
}

label {
    margin-bottom: 5px;
}

.form-group label {
    display: block;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    background-color: transparent;
    border: 1px solid var(--sg-calvoerde-on-background-color);
    border-radius: 8px;
    transition: 0.125s linear;
}

.form-group input:hover, .form-group textarea:hover {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.form-group input:focus, .form-group textarea:focus {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 0 0px;
    padding: 8px 16px;
    width: fit-content;
    border-radius: 8px;
    background-color: var(--sg-calvoerde-red);
    border: none;
    cursor: pointer;
    transition: 0.125s linear;
}

.button p, .button svg {
    color: white;
}

.button:hover {
    background-color: #cb0018;
}

.error {
    color: var(--sg-calvoerde-red);
    font-size: 12px;
    font-style: italic;
}

.textarea {
    width: 100%;
    min-height: 256px;
    padding: 8px;
    border: 1px solid var(--sg-calvoerde-on-background-color);
    border-radius: 8px;
    text-align: justify;
    resize: none;
    outline: none;
    font-size: 16px;
    background-color: var(--sg-calvoerde-background-color);
    color: var(--sg-calvoerde-on-background-color);
    transition: 0.125s linear;
}

.textarea:hover {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.textarea:focus {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.textarea::placeholder, .form-group input::placeholder {
    color: #aaa;
}

/* ---------------- form end ---------------- */

.pdf-preview {
    width: 100%;
    height: calc(100vh - var(--sg-calvoerde-top-navbar-height));
}

#file-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#file-overview .sh-container {
    width: calc(50% - 8px);
    margin: unset;
}

@media (max-width: 575.9px) {
    #file-overview .sh-container {
        width: 100%;
    }
}

#search-results {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#search-results .search-result {
    color: var(--sg-calvoerde-on-background-color);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.125s linear;
}

#search-results .search-result:hover {
    background-color: var(--sg-calvoerde-table-row-hover);
}

.profiles-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.profile-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin: unset;
    flex-grow: 1;
    box-sizing: border-box;
}

.profile-picture {
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-picture.grey {
    filter: grayscale(1);
}