/* styles.css */

:root {
    --bg1-color: #f5f5f5; /* lightest background */
    --bg2-color: #e0e0e0;
    --bg3-color: #d4d4d4;
    --bg4-color: #c0c0c0;
    --bg5-color: #b0b0b0; /* darkest light background */
    --bg6-color: #f0f0f0;
    --bg7-color: #e9e9e9;
    --bg8-color: #fff;
    --text1-color: #222222; /* primary text */
    --text2-color: #111111; /* secondary text */
}

[data-theme="dark"] {
    --bg1-color: #333;
    --bg2-color: #444;
    --bg3-color: #222;
    --bg4-color: #2a2a2a;
    --bg5-color: #1e1e1e;
    --bg6-color: #303030;
    --bg7-color: #666;
    --bg8-color: #888;
    --text1-color: #f5f5f5;
    --text2-color: #fff;
}

/* General hover styling */
*:hover {
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    /*filter: brightness(1.1); /* Slightly brighten hovered elements */
}

/* Custom scrollbar styling for all scrollable elements */
*::-webkit-scrollbar {
    width: 20px; /* Width of vertical scrollbar */
    height: 20px; /* Height of horizontal scrollbar */
}

*::-webkit-scrollbar-thumb {
    background-color: var(--bg2-color); /* Dark color for the scrollbar thumb */
    border-radius: 4px; /* Rounded corners for the thumb */
    border: 2px solid var(--bg3-color); /* Subtle border for contrast */
}

*::-webkit-scrollbar-track {
    background: var(--bg5-color); /* Match the background of the editor */
    border-radius: 4px; /* Rounded corners for the track */
}

/* Scrollbar thumb hover effect */
*::-webkit-scrollbar-thumb:hover {
    background-color: var(--bg7-color); /* Lighten the thumb on hover */
}

/* Scrollbar thumb active (when clicked) */
*::-webkit-scrollbar-thumb:active {
    background-color: var(--bg8-color); /* Further lighten when active */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Fira Code', 'Courier New', monospace;
    background-color: var(--bg5-color);
    color: var(--text1-color);
}

#container {
    display: flex;
    flex-direction: column; /* important! stack panels vertically */
    height: 100vh;
    width: 100vw;
}

/* Menu Panel */
#menu-panel {
    height: 40px;
    width: 100%;
    background-color: var(--bg1-color);
    color: var(--text2-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
}

/* Menu Bar */
#menu-bar {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif; /* Use Arial font */
}

#desktop-menu-bar{
    flex: 1;
    display: flex;
    align-items: flex-end;
    height: 100%;
}

#menu-bar #divisor {
    flex: 1;
}

#menu-bar ul {
    list-style: none;
    display: flex;
    gap: 0px;
    height: 100%;
}

#menu-bar ul li {
    position: relative;
    display: flex;
    align-items: center; /* Center text vertically */
    justify-content: center; /* Center text horizontally */
    height: 100%;
}

#menu-bar .btn {
    text-decoration: none;
    color: var(--text2-color);
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar li:hover {
    background-color: var(--bg2-color);
}

#menu-bar .dropbtn {
    text-decoration: none;
    color: var(--text2-color);
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    background-color: var(--bg1-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
    min-width: 150px;
    max-width: 90vw;
    overflow-x: auto;
    left: 0px;
    transform: translateX(-50%);
    overflow-x: auto;
    box-sizing: border-box;
}

#menu-bar .dropdown-content a {
    display: block;
    text-decoration: none;
    color: var(--text2-color);
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar .dropdown-content a:hover {
    background-color: var(--bg2-color);
}

#menu-bar .dropdown:hover .dropdown-content {
    display: block;
}

#menu-bar ul li.not-selectable:hover,
#menu-bar ul li.not-selectable .btn:hover,
#menu-bar ul li.not-selectable .dropbtn:hover {
    background-color: inherit !important;
    cursor: default !important;
}

/* Right Panel */
#right-panel {
    flex: 1; /* Take up remaining space */
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    overflow: hidden;
    position: relative;
}

/* Output Areas */
#displayer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    /*height: 100%;*/
    background-color: var(--bg3-color); /* optional, for testing visibility */
}

.hidden {
    display: none !important;
}