/* Enhanced Dark Theme Window Styles */

.window-container {
    /* border: 1px solid #FFF; */
    background-color: white; /* Deep dark background for the main container */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* Enhanced shadow for depth */
    display: flex;
    flex-direction: column;
    overflow: auto;
    z-index: 99;
    border-radius: 8px; /* Rounded corners for a modern feel */
    position: relative;
    /* user-select: none; */
    resize: both;
}

.window-container:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6); /* More prominent shadow */
}
/* Window Title Bar */
/* TODO: the linear gradient should go from top to bottom, not diagonally */
.window-title-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* background: linear-gradient(180deg, #666666, #353535); */
    /* color: #e0e0e0; */
    padding-top: 8px;
    padding-left: 8px;
    padding-bottom: 4px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-shadow: #000 0 1px 1px;
    border-bottom: 1px solid #444;
    border-radius: 8px 8px 0 0; /* Match window container corners */
    user-select: none;
    cursor: grab;
}

.window-title-bar {
  background: var(--window_top-background);
  color: var(--window_top-color);
}

.bp-window-content,
.window-main,
.buddyListHolder {
  background: var(--window_content-background);
  color: var(--window_content-color);
  /* user-select: none; */
}

button {
  background: var(--desktop_button-background);
  color: var(--desktop_button-color);
  border-radius: var(--desktop_button-border-radius);
  padding: var(--desktop_button-padding);
}

.window-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

/* Window Controls - Traffic Light Buttons */
.window-controls {
    display: flex;
    gap: 6px; /* Space between buttons */
    padding-right: 8px;
    right: 0px;
    position: absolute;
    background: none;
}

.window-controls button {
    width: 12px;
    height: 12px;
    background: none;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px; /* Size for UTF-8 circle symbols */
    line-height: 1;
    transition: transform 0.2s ease;
    margin: 1px;
}

.window-controls button:hover {
    transform: scale(1.2); /* Slightly enlarge on hover */
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.5); /* Subtle glow effect */
}


/* Individual Button Colors */
.window-controls button:nth-child(1) {
    color: #ff5f57; /* Red (Close) */
}

.window-controls button:nth-child(2) {
    color: #ffbd2e; /* Yellow (Minimize) */
}

.window-controls button:nth-child(3) {
    color: #28c840; /* Green (Maximize) */
}


/* Window Content */
.bp-window-content {
    /* padding: 16px; */
    overflow: auto;
    flex-grow: 1;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 0 0 8px 8px; /* Matches the overall rounded corners */
    /* user-select: none; */
    /* background: white; */
}

/* Resize Handle */
.resize-handle {
    width: 16px; /* Larger for easier resizing */
    height: 16px;
    background: linear-gradient(135deg, #444, #666); /* Gradient for texture */
    position: absolute;
    bottom: 4px;
    right: 4px;
    cursor: se-resize;
    border-radius: 4px; /* Rounded for consistency */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Subtle shadow for clarity */
    pointer-events: auto; /* Explicitly allow pointer events */
    touch-action: none; /* Prevent default touch behaviors like scrolling */
    z-index: 1000; /* Ensure it's above other elements */


}

.resize-handle:hover {
    background: linear-gradient(135deg, #666, #888); /* Lighten on hover */
}

/* Animations and Transitions */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 204, 0, 0.8);
    }
}

/* Optional: Focused State */
.window-container:focus-within {
    /* box-shadow: 0 8px 16px rgba(255, 204, 0, 0.5);  */
    /* Gold glow to indicate focus */
    /* animation: subtle-pulse 1.5s infinite; Optional subtle pulse */
}

.window-btn {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 20px;
    font-size: 18px;
    margin-top: 20px;
}

.window-btn:hover {
    background-color: #333;
    /* slight zoom : taken out since it moves the window / seems like a jitter */
    /* transform: scale(1.05); */
}

.window-not-resizeable {
    resize: none !important;
}
@media (max-width: 767px) and (pointer: coarse) and (hover: none) {
    /* Set a base font size for consistency (optional, only if not already set) */
    html {
        font-size: 16px; /* Adjust to 14px or 15px if you want smaller scaling */
    }

    .window-controls > button {
        width: 2rem !important;
        height: 2rem !important;
        padding: 1.5rem !important;
        font-size: 2rem !important;
    }

    .window-title-text {
        font-size: 1.3rem; /* ~28px, prominent but not 64px huge */
    }

    .window-icon {
        width: 2.5rem; /* ~40px, smaller but still visible */
        height: 2.5rem;
        margin-right: 0.75rem; /* ~12px, slightly smaller margin */
    }
}