@font-face {
    font-family: 'Bahnschrift';
    src: url('../../Fonts/bahnschrift.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Navbar styling */
.navbar {
    font-family: 'Bahnschrift', sans-serif;
    background-color: rgba(var(--bar-color, rgb(0, 0, 0)), 0.3);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: auto;
    margin: 0 auto;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    transition: background-color 0.3s ease;
    z-index: 1000;
    display: inline-block;
}

/* Navbar links */
.navbar nav {
    display: flex;
    justify-content: center;
}

.navbar a {
    color: var(--text-color, #fff);
    text-decoration: none;
    margin: 0 15px;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
}

.navbar a:hover {
    color: #2575fc;
    transform: translateY(-2px);
}

.navbar a:active {
    transform: translateY(1px);
}

/* General Styles */
body::before {
    content: "";
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110vw; /* Slightly larger than the viewport */
    height: 110vh;
    background-image: var(--bg-image, url('../../default-bg.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(var(--bg-brightness, 1)) blur(var(--bg-blur, 10px));
    transform: scale(1.1); /* Slightly scales the background */
    z-index: -1;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Bahnschrift', sans-serif;
    color: rgb(var(--text-color, rgb(255, 255, 255)));
    background-color: rgba(0, 0, 0, 0.5); /* Fallback for older browsers */
    overflow: hidden; /* Prevents scrolling */
    transition: background-color ease-in 0.1s;
}

/* Dark/light mode button */

.hidden {
    display: none;
}

#theme-toggle {
    position: absolute;
    bottom: 32px;
    right: 25px;
    border: none;
    padding-top: 6px;
    padding-bottom: 2.5px;
    border-radius: 8px;
    background-color: transparent;
    transition: background-color 0.1s ease-in-out;
}

#theme-toggle:hover {
    background-color: rgba(var(--button-color, rgb(0, 0, 0)), 0.1);
    transition: background-color 0.05s ease-in-out;
}

#theme-toggle:active {
    background-color: rgba(var(--button-color, rgb(0, 0, 0)), 0.3);
}

.lucide-moon {
    stroke: #264166 !important;
}

.lucide-sun {
    stroke: #e9b308 !important
}

.lucide-moon,
.lucide-sun {
    width: 35px !important;   /* Larger width */
    height: 35px !important;  /* Larger height */
}

/* 
    Theme modal stuff
*/

#theme-modal {
    z-index: 510;
    width: 310px !important;
    height: 425px !important;
    position: absolute !important;
    left: calc(100% - var(--theme-modal-width) - 25px);
    top: calc(100% - var(--theme-modal-height) - 100px);
}

#themes-grid {
    display: grid;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 10px;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
}

.theme-option {
    border: none;
    background-color: transparent;
    border-radius: 8px;
    align-self: center;
    justify-self: center;
    width: 70px;
    height: 70px;
    transition: background-color 0.1s ease-in-out;
}

.theme-option:hover {
    background-color: rgba(var(--button-color, rgb(0, 0, 0)), 0.1);
    transition: background-color 0.05s ease-in-out;
}

.theme-option:active {
    background-color: rgba(var(--button-color, rgb(0, 0, 0)), 0.3);
}

.theme-icon path {
    transition: fill 0.1s ease-in-out;
}

/* Old theme modal stuff: move to settings later */

#theme-settings-container {
    margin-left: 15px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.theme-setting-outer h2 {
    margin-bottom: 5px;
}

.title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    gap: 5px;
}

.reset-to-default {
    width: 30px !important;
    height: 30px !important;
    margin-top: 12px;
    display: flex;
    align-items: center;
}

.reset-to-default .lucide {
    width: 20px !important;
    height: 20px !important;
}

.theme-setting-inner {
    margin-left: 15px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.theme-setting-inner .color-inputs {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.theme-setting-inner h3 {
    font-weight: lighter;
    font-size: 20px;
    margin: 0px 5px;
}

.color-inputs input[type="text"] {
    width: 60px;
    height: 17px;
    padding: 5px;
    background: rgba(var(--theme-color, rgb(0, 0, 0)), 0.15); /* Semi-transparent background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgb(var(--text-color, rgb(255, 255, 255)));
    font-size: 0.9rem;
    font-family: 'Bahnschrift', sans-serif;
    outline: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.improper-format {
    border: 1px solid rgba(255, 0, 0, 0.7);
    outline: 2px solid rgba(255, 0, 0, 0.7) !important;
}

.theme-setting-inner input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.theme-setting-inner input[type="color"] {
    border: none;    
    background: none;
    width: 70px;
    height: 35px;
    padding: none;
    border-radius: 10px;
}

.theme-setting-inner input[type="color"]::-webkit-color-swatch {
    border-radius: 5px;
}

/* 
    Warning popup stuff
*/

#user-confirmation {
    resize: none;
    height: fit-content;
}

#user-confirmation .action-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px
}

#user-confirmation p {
    margin-right: 20px !important;
    font-size: 18px;
}

.action-buttons button {
    margin-left: 0px !important;
    margin-right: 0px !important;
    font-size: larger !important;
}

.action-buttons #continue-action {
    background: rgba(255, 0, 0, 0.2);
    color: #ffbfbf;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#calendar.priority {
    z-index: 1000;
}

#general-overlay,
#warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    backdrop-filter: blur(8px);
    display: none;
    z-index: 500;
    transition: opacity 0.2s ease-in-out;
}

/* Taskbar */
#taskbar {
    font-family: 'Bahnschrift', sans-serif;
    background-color: rgba(var(--bar-color), rgba(0, 0, 0, 0.01));
    padding: 0px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: auto;
    margin: 0 auto;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: flex;
    transition: 
        width 0.3s ease,
        background-color 0.3s ease,
        box-shadow 0.3s ease;
    min-width: 70px;
    min-height: 70px;
    white-space: nowrap;
    overflow: hidden;
}

#taskbar #app-icon .lucide,
.widget-launcher-btn .lucide {
    width: 50px;
    height: 50px;
    stroke-width: 1.9;
    stroke: rgb(var(--icon-color, rgb(var(--widget-color, rgb(0, 0, 0)))));
    transition: transform 0.2s ease-in-out, stroke 0.3s ease;
}

.widget-launcher-btn .lucide-cloud-sun {
    width: 55px !important;
    height: 55px !important;
}

#widget-launcher {
    width: 380px !important;
    resize: none;
}

.widget-grid {
    padding: 15px;
    padding-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: center;
    justify-items: center;
}

#contextmenu {
    z-index: 600;
    width: 310px !important;
}

.toggle-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    gap: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 10px;
}

.icon-option {
    width: 140px !important;
    margin: 0px !important;
}

.icon-option.disabled {
    background: rgba(128, 128, 128, 0.2) !important;
    color: grey !important;
}

.reset-to-default,
.action-buttons button,
.icon-option
 {
    width: 100px;
    padding: 10px 5px 8px;
    margin-left: 10px;
    margin-right: 10px;
    background: rgba(var(--button-color, rgb(0, 0, 0)), 0.2);
    border: none;
    border-radius: 10px;
    color: var(--text-color, #fff);
    font-size: medium;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-family: 'Bahnschrift', sans-serif; 
}

.reset-to-default:hover,
.action-buttons button:hover,
.icon-option:not(.disabled):hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.reset-to-default:active,
.action-buttons button:active,
.icon-option:active {
    transform: translateY(1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

#widget-list {
    list-style-type: none;
    flex-direction: column;
    padding-left: 25px;
}

#widget-list li {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
}

#widget-list li h3 {
    margin-right: 25px;
    margin-left: 0px;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: large;
    font-weight: normal;
    opacity: 1;
    transition: opacity 0.1s ease-in-out;
}

#widget-list .inactive h3 {
    opacity: 0.4;
}

#widget-list .inactive input {
    opacity: 0.7;
}

.movable-icon {
    position: relative;
}

#movable-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

#app-icon {
    background: none;  /* Removes background */
    border: none;       /* Removes border */
    padding: 0;         /* Removes default button padding */
    cursor: pointer;
    display: inline-flex;      /* Ensures the button only wraps the image */
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

#app-icon.weather,
.widget-grid .weather .lucide-cloud-sun {
    margin-bottom: 4px;
    margin-right: -7px;
}

#app-icon.weather .lucide-cloud-sun {
    margin-top: -0px;
}

#app-icon.dragging {
    opacity: 0.5;
}

.widget-grid .weather {
    margin-bottom: 10px;
}

.widget-launcher-btn {
    border: none;
    background: none;
    width: 50px !important;
    height: 50px !important;
    padding: 0px !important;
}

#taskbar #app-icon .lucide,
.editor-icon-preview {
    transition: transform 0.2s ease-in-out;
}

#taskbar #app-icon .lucide:hover,
.editor-icon-preview:hover,
.widget-launcher-btn .lucide:hover {
    transform: scale(1.1); /* Slightly enlarges on hover */
}

#taskbar #app-icon .lucide:active,
.editor-icon-preview:active,
.widget-launcher-btn .lucide:active {
    transform: scale(0.95);
}
