/* Global Styles */
body { 
    background-color: #f8f9fa; 
    overflow-x: hidden; 
}

/* Layout */
#wrapper {
    display: flex;
    width: 100%;
    height: calc(100vh - 56px); /* Subtract navbar height */
}

#sidebar-wrapper {
    min-height: 100%;
    width: 250px;
    margin-left: 0;
    transition: margin .25s ease-out;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
}

#sidebar-wrapper .list-group {
    width: 250px;
}

#page-content-wrapper {
    width: 100%;
    overflow-y: auto;
}

/* Sidebar Elements */
.sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.list-group-item {
    border: none;
    padding: 0.75rem 1.25rem; /* Decreased padding from 1rem */
}

.list-group-item.active {
    background-color: #e9ecef;
    color: #000;
    border-color: #dee2e6;
    font-weight: 500;
}

/* Japanese Text Styling */
ruby { ruby-position: over; }
rt { 
    font-size: 0.5em; 
    color: #666;
    margin-bottom: 0.2em; 
}
body:not(.show-furigana) rt { display: none !important; }
.japanese-text { font-size: 1.2em; line-height: 2.0; }

/* Admin Forms */
input.admin-form-input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}
.helptext { display: none; }

/* =========================================
   Theme System 
   Variables are injected in base.html based on user settings
   ========================================= */

/* Top Navigation */
.navbar-theme {
    background-color: #212529; /* Default fallback */
    background-color: var(--theme-dark) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-dark);
}

.text-primary {
    color: var(--theme-medium) !important;
}

.text-theme {
    color: var(--theme-medium) !important;
}

/* Buttons */
.btn-theme {
    background-color: var(--theme-medium);
    border-color: var(--theme-medium);
    color: #fff;
}

.btn-theme:hover {
    background-color: var(--theme-dark);
    border-color: var(--theme-dark);
    color: #fff;
}

.btn-theme-dark {
    background-color: var(--theme-dark);
    border-color: var(--theme-dark);
    color: #fff;
}

.btn-theme-dark:hover {
    background-color: var(--theme-medium);
    border-color: var(--theme-medium);
    color: #fff;
}

.btn-outline-theme {
    color: var(--theme-medium);
    border-color: var(--theme-medium);
}

.btn-outline-theme:hover {
    background-color: var(--theme-medium);
    color: #fff;
}

/* Interactive Elements (Hover effects) */
.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: var(--theme-light) !important;
    color: var(--theme-dark);
}

/* Links */
a {
    color: var(--theme-medium);
    text-decoration: none;
}
a:hover {
    color: var(--theme-dark);
    text-decoration: underline;
}
