/* Styles for the Desktop page */
.hidden {
    display: none !important;
}

strong {
    font-weight: 600;
}

body {
    background-color: var(--color-background);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.2;
}

main {
    display: flex;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    background-image: url('../assets/images/wallpaper/wallpaper-1.jpg');
    background-size: cover;
    pointer-events: none;
}

p {
    margin-top: 0;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100vw;
    height: 4vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}

.taskbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: 0.75rem;
    width: 60%;
}

.taskbar-status {
    display: flex;
    align-items: center;
    gap: .25rem;
    width: auto;
    margin-right: 0.75rem;
}

.taskbar-app-icon {
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-icon);

}

.taskbar-app-icon:hover {
    transform: scale(1.05);
    background-color: rgba(10, 10, 10, 0.4);
}

.taskbar-app-icon:active {
    transform: scale(0.95);
}

.taskbar-app-icon.minimized-app {
    background-color: var(--color-background);
}

.taskbar-status-icon {
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
    color: var(--color-icon);
}

.taskbar-status-icon:hover {
    background-color: rgba(10, 10, 10, 0.4);
}

.taskbar-status-icon#clock {
    width: 6rem;
}

.taskbar-app-icon > svg,
.taskbar-status-icon > svg {
    width: 75%;
    height: auto;
    fill: currentColor;
}

#clock-date {
    font-size: 0.75rem;
}

/* Desktop Styles */
#desktop-grid {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.desktop-icon {
    width: 60px;
    height: 70px;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    pointer-events: auto;
    z-index: 5;
    font-size: 0.75rem;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
    color: var(--color-white);
}

.desktop-icon:hover {
    background-color: rgba(10, 10, 10, 0.4);
}

.desktop-icon.dragging {
    position: absolute;
    z-index: 2000;
    transition: none;
}

.desktop-icon.selected {
    background-color: #176e8c80;
}

.desktop-icon.cut-item {
    color: var(--color-subtle-text);
}

.desktop-icon-glyph {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
}

.desktop-icon-glyph .desktop-icon-app-svg,
.desktop-icon-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.desktop-icon-glyph .icon-color-wrapper {
    color: var(--color-icon);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-icon-label {
    display: block;
    max-width: 58px;
    margin-top: 0.1rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-white);
}

#minimized-menu {
    position: absolute;
    bottom: 4vh;
    left: 0;
    background-color: var(--color-card);
    border-radius: 0.5rem 0.5rem 0 0;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 1000;
}

.minimized-menu-item {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.minimized-menu-item:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.minimized-menu-item:hover {
    background-color: var(--color-background);
}

/* Window Styles */
#window-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 96vh;
    pointer-events: auto;
    overflow: hidden;
}

.window {
    pointer-events: auto;
    position: absolute;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-black);
    border-radius: 0.5rem;
    box-sizing: border-box;
    z-index: 500;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease;
}

.window.minimized {
    transform: scale(0.6) translateY(40vh);
    opacity: 0;
    pointer-events: none;
}

.window-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    background-color: var(--color-card);
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    flex: 1;
    overflow: hidden;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--color-background);
    padding: 0.5rem;
    cursor: move;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    -ms-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.window-header:active {
    cursor: grabbing;
}

.window-operations {
    display: flex;
    gap: 0.5rem;
}

.window-minimize {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-yellow);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.4rem;
    color: var(--color-white);
}

.window-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.4rem;
    color: var(--color-white);
}

.window-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-gentle-red);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.4rem;
    color: var(--color-white);
}

.window-minimize:hover {
    background-color: var(--color-yellow-dark);
}

.window-fullscreen:hover {
    background-color: var(--color-primary-dark);
}

.window-close:hover {
    background-color: var(--color-gentle-red-dark);
}

/* Window Resize Handles */
.resizer {
    position: absolute;
    z-index: 10;
}

.resizer.n { top: -5px; left: 0; right: 0; height: 10px; cursor: n-resize; }
.resizer.e { right: -5px; top: 0; bottom: 0; width: 10px; cursor: e-resize; }
.resizer.s { bottom: -5px; left: 0; right: 0; height: 10px; cursor: s-resize; }
.resizer.w { left: -5px; top: 0; bottom: 0; width: 10px; cursor: w-resize; }

.resizer.nw { top: -5px; left: -5px; width: 15px; height: 15px; cursor: nw-resize; }
.resizer.ne { top: -5px; right: -5px; width: 15px; height: 15px; cursor: ne-resize; }
.resizer.se { bottom: -5px; right: -5px; width: 15px; height: 15px; cursor: se-resize; }
.resizer.sw { bottom: -5px; left: -5px; width: 15px; height: 15px; cursor: sw-resize; }

#selection-box {
    position: absolute;
    border: 1px solid #176e8cd0;
    background-color: #229bc750;
    z-index: 1000;
    pointer-events: none;
}

#launcher-iframe {
    position: fixed;
    bottom: calc(4vh + 10px);
    left: 20px;
    width: 380px;
    height: 360px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.2s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
    background-color: var(--color-background);
}

#launcher-iframe.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
