/* Sidebar Styles */
.sidebar {
    position: relative;
    width: 400px;
    height: 100%;
    background-color: #f8f9fa;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: margin-right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    /* Margin is set dynamically via JavaScript based on sidebar width */
}

/* Resize Handle */
.sidebar-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
    background-color: transparent;
    transition: background-color 0.2s;
    z-index: 1002;
}

.sidebar-resize-handle:hover {
    background-color: rgba(13, 110, 253, 0.3);
}

.sidebar-resize-handle.resizing {
    background-color: rgba(13, 110, 253, 0.5);
}

.sidebar-toggle {
    position: absolute;
    left: -20px;
    top: 8px;
    width: 20px;
    height: 24px;
    border-radius: 3px 0 0 3px;
    border: none;
    background-color: #0d6efd;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
    z-index: 1001;
    padding-left:7px;
    padding-right:7px;
    padding-top:10px;
    padding-bottom:10px;
}

#toggle-icon {
    font-size:  0.65em;
}

.sidebar-toggle:hover {
    background-color: #0b5ed7;
}

.sidebar-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Sidebar Error Banner */
.sidebar-error {
    display: flex;
    align-items: flex-start;
    background-color: #f8d7da;
    color: #842029;
    border-bottom: 1px solid #f5c2c7;
    padding: 8px 12px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-error-message {
    flex: 1;
    margin-right: 8px;
    line-height: 1.4;
}

.sidebar-error-close {
    background: transparent;
    border: none;
    color: #842029;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.7;
    flex-shrink: 0;
}

.sidebar-error-close:hover {
    opacity: 1;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 6px 6px 5px 6px;
    border-bottom: 1px solid #dee2e6;
    /* JR CUSTOMIZED */
    padding-left: 16px;
    padding-top: 2px;
}

.sidebar-content h4 {
    color: #333;
    margin: 0;
    font-weight: 600;
    /* JR CUSTOMIZED */
    /*font-size: 0.9rem;*/
    font-size: 1.1rem;
}

.sidebar-menu-btn {
    color: #6c757d;
    border: none;
    background: transparent;
    padding: 2px 6px;
    line-height: 1;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.sidebar-menu-btn:hover {
    color: #0d6efd;
    background: transparent;
}

.sidebar-menu-btn:focus {
    box-shadow: none;
}




/* Tab Styles - Traditional Look */
.nav-tabs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 8px 15px 0 15px;
    margin: 0;
    flex-shrink: 0;
}

.nav-tabs .nav-item {
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
    margin-bottom: -1px;
    margin-right: 3px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.15s ease-in-out;
    position: relative;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    background-color: #f1f3f5;
    border-color: #ced4da #ced4da #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #ffffff;
    border-color: #dee2e6 #dee2e6 #ffffff;
    font-weight: 600;
    z-index: 1;
}

/* Add subtle shadow to active tab for depth */
.nav-tabs .nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to bottom, rgba(13, 110, 253, 0.15), transparent);
    border-radius: 0.375rem 0.375rem 0 0;
}

.tab-content {
    background-color: #ffffff;
    flex: 1;
    overflow: hidden;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.tab-content .tab-pane {
    padding: 0;
    height: 100%;
    display: none;
    flex-direction: column;
}

.tab-content .tab-pane.active {
    display: flex;
}

/* Advanced search content wrappers */
#advanced-enabled-content,
#advanced-disabled-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Result container divs - must fill remaining space */
#white-lister,
#yellow-lister,
#reverse-lister,
#advanced-lister,
#bookmarks-lister {
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Important for Firefox */
}

#history-lister {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for Firefox */
}

/* Scrollbar styling for history results */
#history-lister::-webkit-scrollbar {
    width: 6px;
}

#history-lister::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#history-lister::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#history-lister::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Search box wrapper */
.search-box-wrapper {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    background-color: #ffffff;
    flex-shrink: 0;
}

/* Search input container with clear button */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container .form-control,
.search-input-container .form-select {
    padding-right: 2.5rem;
}

.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    font-size: 1.25rem;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
}

.search-clear-btn:hover {
    color: #495057;
    background-color: #f1f3f5;
}

.search-clear-btn.visible {
    opacity: 1;
    visibility: visible;
}

.search-clear-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.yellow-search-clear-btn {
    /* yellow button needs to move left to not get in way of dropdown arrow */
    margin-right: 1.5rem;
}

#yellow-search-select {
    /* extra right padding for button inside select box */
    padding-right: 3.5rem;
}

/* Search input with help button wrapper */
.search-input-with-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-with-help .search-input-container {
    flex: 1;
}

/* Search help button */
.search-help-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    background: transparent;
    color: #6c757d;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
    padding: 0.25rem;
    line-height: 1;
}

.search-help-btn:hover {
    color: #495057;
    background-color: #f1f3f5;
}

.search-help-btn:active {
    background-color: #e9ecef;
}

.search-help-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Result containers need to fill remaining space */
.tab-pane > div[id$="-lister"] {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Form elements in tabs */
.tab-content .form-control,
.tab-content .form-select {
    border-radius: 0.375rem;
}

.tab-content .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 350px;
    }

    .sidebar.collapsed {
        margin-right: -100%;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin-right: 2px;
    }

    .tab-content .tab-pane {
        padding: 16px;
    }

    .sidebar-content h4 {
        padding: 15px 15px 12px 15px;
        font-size: 1.1rem;
    }
}


.jrInlineTextButton {
    margin-top: -.1rem;
    vertical-align: top;
    color: var(--bs-link-color);
}

.jrInlineTextButton:hover,
.jrInlineTextButton:focus {
    color: var(--bs-link-hover-color);
}




/* fade in text using js helper */
.jrfade-status {
  opacity: 1;
}

.jrfade-status.animate {
  animation: jrfadeIn 0.5s ease forwards;
}

@keyframes jrfadeIn {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}


