/* Global Styles for GDWARF */

/* 
 * 1. Floating Scrollbar Geometry
 * This makes the body 100% of the window width, 
 * forcing the scrollbar to float on top instead of pushing content.
 */
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body { 
    width: 100vw;
    overflow-x: hidden;
    background-color: #f8f9fa;
    display: flex !important;
    flex-direction: column !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Slim scrollbar thumb that floats over the content */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #212529; /* Navbar dark color */
}
::-webkit-scrollbar-thumb {
    background-color: #f8f9fa; /* Site background light color */
    border-radius: 10px;
    border: 2px solid #212529; /* Creates a gap effect around the thumb */
}
::-webkit-scrollbar-thumb:hover {
    background-color: #ffffff;
}

/* Suppress Bootstrap's modal-open shift */
body.modal-open {
    padding-right: 0 !important;
    overflow: hidden;
}

/* 2. Navbar Vertical Centering (Y-Axis) */
.navbar {
    z-index: 1030;
    flex-shrink: 0;
    padding: 0 !important;
    height: 60px; /* Rigid height */
}

.navbar .container {
    height: 60px;
    display: flex !important;
    align-items: center !important; /* Perfect Y-axis alignment */
}

.navbar-brand { 
    font-weight: bold; 
    letter-spacing: 1px;
    height: 60px;
    display: flex !important;
    align-items: center !important;
    margin-right: 1.5rem;
    padding: 0;
    position: relative;
}

.navbar-nav {
    display: flex !important;
    align-items: center !important;
    height: 60px;
}

.navbar-nav .nav-item {
    height: 60px;
    display: flex !important;
    align-items: center !important;
}

.navbar-nav .nav-link {
    height: 60px;
    display: flex !important;
    align-items: center !important; /* Center text vertically */
    padding: 0 1rem !important;
    transition: color 0.2s ease;
    position: relative;
}

/* Active Underline - Bottom of the 60px bar */
.nav-link.active::after, .navbar-brand.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 3px;
    background-color: #0d6efd;
}

.navbar-brand.active::after {
    left: 0;
    right: 0;
}

/* 3. Flush In-style Dropdown */
.navbar .dropdown-menu {
    background-color: #212529;
    border: 1px solid #343a40;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0 !important; /* Anchored to bottom of navbar */
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
    padding: 0; /* Remove internal padding to allow full-item highlight */
    overflow: hidden; /* Ensure rounded corners clip the highlights */
}

.navbar .dropdown-item {
    color: #adb5bd;
    padding: 0.75rem 1.5rem; /* Increased vertical padding for better tap area */
    transition: background-color 0.2s, color 0.2s;
}

.navbar .dropdown-item:hover {
    background-color: #343a40; /* More noticeable highlight */
    color: #fff;
}

.navbar .dropdown-divider {
    margin: 0;
    border-top: 1px solid #343a40;
}

.navbar .dropdown-menu .border-bottom {
    border-bottom-color: #495057 !important; /* Lighter, more noticeable border */
}

.navbar .dropdown-menu li:last-child,
.navbar .dropdown-menu li:last-child .border-bottom {
    border-bottom: none !important;
}

/* Notification specific adjustments */
.navbar .dropdown-item .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Force white close button */
}

.navbar .dropdown-item .text-muted {
    color: #adb5bd !important; /* Lighter muted text for better contrast */
}

/* Layout */
.main-content { 
    flex: 1 0 auto !important;
    padding-top: 2rem; 
    padding-bottom: 3rem; 
}

.footer { 
    flex-shrink: 0 !important;
    background-color: #212529 !important; 
    color: #ced4da !important; 
    padding: 1.5rem 0 !important;
}

/* Disclaimer Toast */
.disclaimer-banner { 
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 350px !important;
    z-index: 9999 !important;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.2) !important;
    border-radius: 0.5rem !important;
}

/* Archive Issue Cards */
.issue-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.issue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1) !important;
}
.issue-card:hover .card-title {
    color: #0d6efd !important;
}

.issue-counter {
    display: inline-block;
    min-width: 65px;
    text-align: right;
}

/* Enhanced Search Group Glow */
.input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease-in-out;
}

.input-group:focus-within .form-control,
.input-group:focus-within .btn {
    border-color: #86b7fe;
    box-shadow: none; /* Remove individual child shadows */
}

/* Editor Styles */
.ck-editor__editable_inline { min-height: 500px; }
.diff-panel { font-family: monospace; font-size: 0.82rem; }
.diff-line  { white-space: pre-wrap; padding: 1px 8px; min-height: 1.4em; line-height: 1.5; }
.diff-del   { background: #ffd7d5; }
.diff-add   { background: #d1f0d1; }
