/*
Theme Name: Keyboard Tester Theme
Theme URI: http://example.com/keyboard-tester-theme/
Author: Your Name
Author URI: http://example.com
Description: A custom theme for the online keyboard tester application.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: keyboard-tester-theme
*/

/* All the CSS from your original file goes here */
body {
    font-family: "Inter", sans-serif;
    background-color: #f0f2f5; /* Light gray background */
}
/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Key styling */
.key {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); /* shadow-md */
    cursor: pointer;
    user-select: none;
    color: #1f2937; /* gray-800 */
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* font-semibold */
    transition: all 100ms ease-in-out;
    min-width: 40px; /* Default key width */
    height: 40px;    /* Default key height */
    margin: 4px;     /* Spacing between keys */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    text-align: center; /* Center text for multi-line keys */
    line-height: 1.2; /* Adjust line height for multi-line keys */
    flex-shrink: 0; /* Prevent keys from shrinking too much */
}

.key-active {
    background-color: #3b82f6; /* blue-500 */
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
}

/* Specific key sizes */
.key-esc { width: 50px; }
.key-f { width: 45px; } /* F1-F12 keys */
.key-backspace { width: 90px; }
.key-tab { width: 70px; }
.key-caps { width: 80px; }
.key-enter { width: 100px; }
.key-shift-left { width: 110px; }
.key-shift-right { width: 130px; }
.key-ctrl { width: 70px; }
.key-alt { width: 60px; }
.key-space { width: 300px; }
.key-arrow { width: 40px; height: 40px; } /* Arrow keys are square */
.key-num-enter { height: 90px; } /* Numpad Enter key */
.key-num-plus { height: 90px; } /* Numpad Plus key */
.key-num-0 { width: 90px; } /* Numpad 0 key */

/* Keyboard rows for flexbox layout */
.keyboard-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .main-content {
        padding: 1rem;
    }
    .key {
        min-width: 30px;
        height: 30px;
        margin: 2px;
        font-size: 0.65rem; /* Smaller font for tiny screens */
    }
    .key-backspace, .key-tab, .key-caps, .key-enter, .key-shift-left, .key-shift-right, .key-ctrl, .key-alt, .key-space, .key-num-enter, .key-num-plus, .key-num-0 {
        width: auto; /* Allow these to shrink */
        min-width: 40px; /* Ensure a minimum size */
    }
    #keyboard-container {
        padding: 10px;
    }
    /* Adjust numpad position for smaller screens */
    .numpad-section {
        position: static; /* Remove absolute positioning */
        transform: none;
        margin-top: 20px; /* Add some space below main keyboard */
        align-self: center; /* Center the numpad */
    }
}

/* Sidebar active link styling */
.sidebar-link-active {
    background-color: #dbeafe; /* blue-100 */
    color: #1d4ed8; /* blue-700 */
    font-weight: 600; /* font-semibold */
}
/* Removed hover effect for sidebar links when active */
.sidebar-link-active:hover {
    background-color: #dbeafe; /* blue-100 */
    color: #1d4ed8; /* blue-700 */
}
/* General hover for sidebar links when not active */
.sidebar nav ul li a:not(.sidebar-link-active):hover {
    background-color: #eff6ff; /* blue-50 */
    color: #3b82f6; /* blue-600 */
}
