.oht-speed-sidebar {
    position: fixed;
    right: -520px;
    top: 0;
    width: 520px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    z-index: 999999;
    display: flex;
    flex-direction: column;
}

.oht-speed-sidebar.active {
    transform: translateX(-520px);
}

.sidebar-header {
    padding: 15px;
    background: #2271b1;
    color: #fff;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.metric span {
    font-size: 14px;
    font-weight: 500;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.page-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.plugin-stats {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    color: #666;
}

.plugins-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plugin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.plugin-item.loaded {
    border-color: #4CAF50;  /* Green */
    background-color: rgba(76, 175, 80, 0.1);
}

.plugin-item.disabled {
    border-color: #f44336;  /* Red */
    background-color: rgba(244, 67, 54, 0.1);
}
.plugin-item.queued {
    background-color: rgba(158, 158, 158, 0.1);  /* Grey background */
    border-color: #9e9e9e;  /* Grey border */
    opacity: 0.8;
}

.plugin-item.queued::after {
    content: '⌛';  /* Hourglass emoji or we could use a custom icon */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}
.plugin-item.updating {
    position: relative;
    opacity: 0.7;
}

.plugin-item.updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7) url('loading.gif') center no-repeat;
    background-size: 20px;
    z-index: 1;
}

/* Pulsing animation for updating state */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.plugin-item.updating {
    animation: pulse 1s infinite;
}

.plugin-item:hover {
    background: #f8f9fa;
}

.plugin-name {
    flex: 0 0 auto;
    min-width: 120px;
}

.plugin-controls {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.plugin-section-select {
    width: 160px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Status colors */
.plugin-item.always_disabled { border-left: 3px solid #dc3232; }
.plugin-item.path_disabled { border-left: 3px solid #ffb900; }
.plugin-item.article { border-left: 3px solid #46b450; }

.oht-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    z-index: 100000;
    animation: slideIn 0.3s ease;
}

.oht-notification.success {
    background-color: #00a32a;
}

.oht-notification.error {
    background-color: #d63638;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Custom scrollbar */
.plugins-list::-webkit-scrollbar {
    width: 6px;
}

.plugins-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.plugins-list::-webkit-scrollbar-thumb {
    background: #c3c4c7;
    border-radius: 3px;
}

.plugins-list::-webkit-scrollbar-thumb:hover {
    background: #a7aaad;
}

/* Performance metrics styling */
.performance-metrics li span {
    color: #2271b1;
    font-weight: 500;
}

/* Add/update in existing CSS */
.toggle-sidebar {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 999999;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-sidebar:hover {
    background: #135e96;
}

/* Update page stats styling */
.page-stats {
    margin-bottom: 20px;
}

.stats-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #fff;
}

.stats-section h4 {
    margin: 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.stats-content {
    padding: 8px 12px;
}

.note-section {
    padding: 6px 10px;
    margin-bottom: 8px;
    background-color: #f0f6fc;
    border-left: 4px solid #72aee6;
}

.note-section .note {
    margin: 0;
    color: #1d2327;
    font-size: 11px;
    line-height: 1.4;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-value {
    font-weight: 500;
    color: #2271b1;
}

.reset-section {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 15px;
}

#reset-plugin-config {
    padding: 2px 8px;
    height: auto;
    font-size: 11px;
    line-height: 20px;
    width: 100%;
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#reset-plugin-config:hover {
    background: #b32d2e;
}

#reset-plugin-config:disabled {
    background: #999;
    cursor: not-allowed;
}

