@import url("/colours.css");

body {
        background-color: var(--bg-dark);
        color: var(--text-muted);
        font-family: inter;
        line-height: 1.7;
        margin: 0;
        padding: 20px;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
}

b {
        color: var(--text);
        font-weight: 900;
}

h1,
h2,
h3,
h4,
h5,
h6 {
        color: var(--text);
        margin-top: 24px;
        margin-bottom: 16px;
}

h1 {
        font-size: 2.5em;
}

h2 {
        font-size: 2em;
}

h3 {
        font-size: 1.5em;
}

h4,
h5,
h6 {
        font-size: 1.2em;
}

a {
        color: var(--primary);
        text-decoration: none;
        border-bottom: 2px solid var(--primary);
        cursor: pointer;
}

a:hover {
        color: var(--secondary);
        border-color: var(--secondary);
}

label {
        color: var(--text-muted);
}

ul,
ol {
        padding-left: 30px;
}

ul {
        list-style: "· ";
}

code {
        background-color: var(--bg-light);
        border-radius: 6px;
        color: var(--text-muted);
        padding: 0.4em 0.6em;
        font-family: "courier new", monospace;
}

pre code {
        padding: 0;
}

pre {
        background-color: var(--bg);
        border-radius: 6px;
        padding: 1em;
        overflow: auto;
        box-shadow: 2px 2px 6px #000;
}

blockquote {
        background-color: var(--bg);
        border-left: 4px solid var(--secondary);
        padding-left: 2em;
        margin-left: 0;
        padding-top: 0.5em;
        padding-bottom: 0.5em;
        padding-right: 0.5em;
        color: var(--text);
        font-style: italic;
}

input {
        width: 100%;
        max-width: 20rem;

        padding: 0.75rem 1rem;

        border: 1px solid var(--text-muted);
        border-radius: 0.5rem;

        background-color: var(--bg-light);
        color: var(--text);

        font-size: 1rem;

        transition:
                border-color 0.2s ease,
                box-shadow 0.2s ease;
}

input:focus {
        outline: none;
        border-color: var(--primary);

        box-shadow: 0 0 0 3px
                color-mix(in srgb, var(--primary) 25%, transparent);
}

button {
        cursor: pointer;
        background: var(--bg-light);
        text-decoration: none;

        padding: 12px 20px;
        border: 1px solid var(--text-muted);
        border-radius: 1.5rem;

        color: var(--text);
        font-weight: bold;
        transition: var(--transition);
}

button:hover {
        scale: 1.05;
        transition: var(transition);
}

.card {
        background: var(--bg);
        padding: 1rem 2rem;
        border: var(--border);
        border-top: 1px solid var(--highlight);
        border-radius: 1rem;
        box-shadow: var(--soft-shadow);
        margin: 1.5rem;
}

.card:hover {
        background: var(--gradient-hover);
}

.mini-text {
        font-size: 0.8rem;
}

header {
        display: flex;
        justify-content: space-between;
        align-items: center;
}

#navbar-logo:hover {
        cursor: pointer;
        scale: 1.05;
        transition: var(transition);
}

#theme-switcher {
        background-color: var(--bg-light);
        padding: 0.5rem 0.5rem;
        border-radius: 0.5rem;
        color: var(--text);
        border: 1px var(--border-muted);
}

#theme-switcher:focus {
        outline: none;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
.snackbar {
        visibility: hidden; /* Hidden by default. Visible on click */
        min-width: 250px; /* Set a default minimum width */
        margin-left: -125px; /* Divide value of min-width by 2 */
        color: var(--bg); /* White text color */
        text-align: center; /* Centered text */
        border-radius: 10px; /* Rounded borders */
        padding: 16px; /* Padding */
        position: fixed; /* Sit on top of the screen */
        z-index: 1; /* Add a z-index if needed */
        left: 50%; /* Center the snackbar */
        bottom: 30px; /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
.snackbar.show {
        visibility: visible; /* Show the snackbar */
        /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
  However, delay the fade out process for 2.5 seconds */
        -webkit-animation:
                fadein 0.5s,
                fadeout 0.5s 2.5s;
        animation:
                fadein 0.5s,
                fadeout 0.5s 2.5s;
}

#snackbar-success {
        background-color: var(--success);
}
#snackbar-danger {
        background-color: var(--danger);
}
#snackbar-warning {
        background-color: var(--warning);
}
#snackbar-info {
        background-color: var(--info);
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
        from {
                bottom: 0;
                opacity: 0;
        }
        to {
                bottom: 30px;
                opacity: 1;
        }
}

@keyframes fadein {
        from {
                bottom: 0;
                opacity: 0;
        }
        to {
                bottom: 30px;
                opacity: 1;
        }
}

@-webkit-keyframes fadeout {
        from {
                bottom: 30px;
                opacity: 1;
        }
        to {
                bottom: 0;
                opacity: 0;
        }
}

@keyframes fadeout {
        from {
                bottom: 30px;
                opacity: 1;
        }
        to {
                bottom: 0;
                opacity: 0;
        }
}

/* The Modal (background) */
.modal {
        display: none; /* Hidden by default */
        position: fixed; /* Stay in place */
        z-index: 1; /* Sit on top */
        padding-top: 100px; /* Location of the box */
        left: 0;
        top: 0;
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        overflow: auto; /* Enable scroll if needed */
        background-color: rgb(0, 0, 0); /* Fallback color */
        background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
        position: relative;
        background-color: var(--bg);
        margin: auto;
        padding: 0;
        border: 1px solid var(--text-muted);
        border-radius: 1rem;
        overflow: hidden;
        width: 50%;
        box-shadow: var(--soft-shadow);
        -webkit-animation-name: animatetop;
        -webkit-animation-duration: 0.4s;
        animation-name: animatetop;
        animation-duration: 0.4s;
}

.modal-content > * {
        text-align: center;
}

/* Add Animation */
@-webkit-keyframes animatetop {
        from {
                top: -300px;
                opacity: 0;
        }
        to {
                top: 0;
                opacity: 1;
        }
}

@keyframes animatetop {
        from {
                top: -300px;
                opacity: 0;
        }
        to {
                top: 0;
                opacity: 1;
        }
}

/* The Close Button */
.close {
        color: var(--text);
        float: right;
        font-size: 28px;
        font-weight: bold;
}

.close:hover,
.close:focus {
        color: var(--primary);
        text-decoration: none;
        cursor: pointer;
}

.modal-header {
        padding: 2px 16px;
        background-color: inherit;
        color: var(--text);
}

.modal-body {
        padding: 2px 16px;
}

.modal-footer {
        margin: 2rem auto;
        padding: 2px 16px;
        background-color: inherit;
        color: var(--text);
}

.danger-button {
        background-color: var(--danger);
        color: var(--bg-light);
        border: none;
}

::-webkit-scrollbar {
        width: 12px;
        height: 12px;
}

::-webkit-scrollbar-track {
        background: #1f1c25;
        border-radius: 6px;
}

::-webkit-scrollbar-thumb {
        background-color: #3c3c42;
        border-radius: 6px;
        border: 3px solid #1f1c25;
}

::-webkit-scrollbar-thumb:hover {
        background-color: #5a5466;
}

* {
        scrollbar-width: thin;
        scrollbar-color: #3c3c42 #1f1c25;
}

::-webkit-scrollbar-corner {
        background: #1f1c25;
}
