/**
 * Firmware Info Panel Stylesheet
 * Side panel that slides in from the right
 */

/* Custom Font Declarations */
@font-face {
    font-family: 'Proxima Nova Condensed';
    src: url('../fonts/proxima_nova_cond_reg.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Proxima Nova Condensed';
    src: url('../fonts/proxima_nova_cond_semi_bold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Proxima Nova Condensed';
    src: url('../fonts/proxima_nova_cond_reg_italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}

/* ==================== INFO PANEL (Full Screen from Right) ==================== */
#infoPanel {
    display: none;
    position: fixed;
    z-index: 50;
    /* Below menu panel so menu appears on top */
    top: var(--top-bar-height, 70px);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--top-bar-height, 70px));
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: stretch;
    justify-content: flex-end;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When menu panel is open, shift entire modal to start after menu */
body.menu-open #infoPanel {
    left: 200px;
    /* Width of menu panel */
}

#infoPanel[style*="flex"] {
    display: flex;
    pointer-events: auto;
    /* Enable clicks when modal is open */
    opacity: 1;
}

/* Apply frosted glass effect to main content when modal is open */
body.info-panel-open .container,
body.info-panel-open .dashboard-content,
body.info-panel-open .dashboard-card,
body.info-panel-open #firmwareDashboardCard {
    filter: blur(8px);
    transition: filter 0.5s ease;
    pointer-events: none;
    /* Prevent interaction with blurred content */
}

/* Ensure top-bar and menu panel remain interactive and unblurred */
body.info-panel-open .top-bar,
body.info-panel-open .menu-panel {
    filter: none;
    pointer-events: auto;
}

#infoPanel .modal-container {
    background-image: url("../../images/bg_noise.webp"), linear-gradient(180deg, #f8f8f7, #f1f0ee);
    background-position: 0 0, 0 0;
    background-size: auto, auto;
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    /* Always 100% of parent modal width */
    max-width: 100%;
    height: 100%;
    margin: 0;
    /* No margin needed - parent modal shifts instead */
    border: none;
    border-left: 1px solid #dddfe0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    /* Ensure container is clickable */
    /* Start off-screen to the right, animate in */
    right: -100%;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When modal is shown, slide in from right */
#infoPanel[style*="flex"] .modal-container {
    right: 0;
}

/* Mobile phone fullscreen mode */
#infoPanel.mobile-fullscreen {
    width: 100%;
}

#infoPanel.mobile-fullscreen .modal-container {
    width: 100%;
}

/* ==================== PANEL HEADER & BODY ==================== */
/* Modal Header - Always visible on top */
#infoPanel .modal-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dddfe0;
    flex-shrink: 0;
    background: white;
    margin-bottom: 20px;
    gap: 1rem;
    position: relative;
    z-index: 10001;
    /* Above dropdowns (10000) */
}

#infoPanel .modal-header h2 {
    display: none;
    /* Hide default title, replaced by custom header content */
}

/* Modal Body - Scrollable content */
#infoPanel .modal-body {
    padding: 0 2rem 2rem 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    /* Allow flex item to shrink below content size */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#infoPanel .modal-body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Ensure dropdowns in info panel stay below header */
#infoPanel .filter-dropdown-list {
    z-index: 9999 !important;
    /* Below modal-header (10001) */
}

/* Close button styling */
#infoPanel .modal-header .modal-btn-cancel {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto;
    padding: 8px 16px;
    background: white;
    color: #2c3e50;
    border: 1px solid #dddfe0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#infoPanel .modal-header .modal-btn-cancel:hover {
    background: #f8f9fa;
    border-color: #b0bec5;
}

/* Info Grid */
.info-panel-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-bg, #ffffff);
    border: 1px solid var(--color-border, #dddfe0);
    border-radius: var(--radius-2xl, 1.25rem);
    box-shadow: var(--shadow-md, 0 2px 8px rgba(0, 0, 0, 0.08));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.info-panel-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    padding: 0.75rem;
    background: var(--color-bg-input, #f8f9fa);
    border-radius: var(--radius-md, 8px);
    border-left: 3px solid var(--color-primary, #2d8998);
}

.info-item-label {
    font-size: 10px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-item-value {
    font-size: 12px;
    color: var(--color-text-primary, #2c3e50);
    font-weight: 500;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-promotion-buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: nowrap;
}

.status-promote-btn {
    padding: 4px 12px;
    border: 1px solid var(--color-primary, #2d8998);
    border-radius: 6px;
    background: var(--color-primary, #2d8998);
    color: white;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-promote-btn:hover {
    background: var(--color-primary-dark, #246b78);
    border-color: var(--color-primary-dark, #246b78);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(45, 137, 152, 0.3);
}

.status-promote-btn:active {
    transform: translateY(0);
}

/* Files Section */
.info-files-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-file-item {
    padding: 1rem;
    background: var(--color-bg-input, #f8f9fa);
    border-radius: var(--radius-md, 8px);
    border-left: 3px solid var(--color-primary, #2d8998);
}

.info-file-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary, #2d8998);
    margin-bottom: 0.5rem;
}

.info-file-name {
    font-size: 11px;
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: 0.25rem;
    font-family: monospace;
}

.info-file-details {
    font-size: 10px;
    color: #7f8c8d;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-file-details span {
    display: inline-block;
}

/* Offset Editing */
.offset-value {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline;
}

.offset-value:hover {
    background-color: rgba(45, 137, 152, 0.1);
    text-decoration: underline;
}

.offset-input {
    padding: 2px 8px;
    border: 2px solid #2d8998;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    background: #ffffff;
    color: #2c3e50;
    outline: none;
    width: 90px;
    display: none;
}

.offset-input:focus {
    outline: none;
    box-shadow: var(--shadow-focus-glow);
    border-color: transparent;
}

.info-offset-save-btn {
    display: none;
    background: var(--color-primary-darker, #105c74);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-lg, 10px);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base, all 0.3s ease);
    margin-top: 12px;
    float: right;
}

.info-offset-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
    background: #0d4a5e;
}

/* Release Notes Section */
.info-release-notes {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.4;
    cursor: text;
    width: 335px;
    height: 165px;
    overflow-y: auto;
    transition: background-color 0.2s;
    margin: 0 auto;
}

/* Custom scrollbar - dot style */
.info-release-notes::-webkit-scrollbar {
    width: 6px;
}

.info-release-notes::-webkit-scrollbar-track {
    background: transparent;
}

.info-release-notes::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    min-height: 30px;
}

.info-release-notes::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.info-release-notes:hover {
    background-color: #f8f9fa;
}

.info-release-notes-header {
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.info-release-notes-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.info-release-notes-save-btn {
    display: none;
    background: var(--color-primary-darker, #105c74);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg, 10px);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base, all 0.3s ease);
    margin-top: 12px;
    float: right;
}

.info-release-notes-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
    background: #0d4a5e;
}

.info-release-notes-editor {
    display: none;
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
    resize: vertical;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-release-notes-editor:focus {
    outline: none;
    box-shadow: var(--shadow-focus-glow);
    border-color: transparent;
    background: #ffffff;
}

.info-release-notes h1,
.info-release-notes h2,
.info-release-notes h3,
.info-release-notes h4,
.info-release-notes h5,
.info-release-notes h6 {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    padding-bottom: 0px;
    margin: 0;
}

.info-release-notes p {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: normal;
    font-size: 14px;
    padding-bottom: 0px;
    margin: 0;
    color: #34495e;
}

.info-release-notes ul,
.info-release-notes ol {
    padding-bottom: 0px;
    margin: 0;
    padding-left: 2rem;
}

.info-release-notes li {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: normal;
    font-size: 14px;
    padding-bottom: 0px;
    margin: 0;
    color: #34495e;
}

.info-release-notes strong,
.info-release-notes b {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.info-release-notes em,
.info-release-notes i {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: normal;
    font-style: italic;
    font-size: 14px;
}

.info-release-notes hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    padding-bottom: 0px;
    margin: 0;
}

.info-release-notes .bold {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.info-release-notes .italic {
    font-family: 'Proxima Nova Condensed', sans-serif;
    font-weight: normal;
    font-style: italic;
    font-size: 14px;
}

.info-release-notes .empty-line {
    height: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #infoPanel {
        width: 60%;
        right: -60%;
    }
}

@media (max-width: 768px) {
    #infoPanel {
        width: 100%;
        right: -100%;
    }

    .info-panel-content {
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-panel-title {
        font-size: 18px;
    }
}

/* Loading State */
.info-panel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.info-panel-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2d8998;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error State */
.info-panel-error {
    padding: 2rem;
    text-align: center;
    color: #e74c3c;
}

/* Device Tables */
.device-table-container {
    margin-top: 1rem;
}

.device-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 10px;
}

.device-table-filter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.device-table-filter label {
    font-size: 10px;
    font-weight: 600;
    color: #7f8c8d;
}

.device-table-filter select {
    padding: 4px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.device-table-filter select:focus {
    outline: none;
    box-shadow: var(--shadow-focus-glow);
    border-color: transparent;
}

.device-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    max-height: 250px;
    overflow-y: auto;
}

.device-table {
    width: 100%;
    border-collapse: collapse;
}

.device-table th,
.device-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    font-size: 10px;
}

.device-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 1;
}

.device-table tbody tr:hover {
    background-color: #f8f9fa;
}

.device-table tbody tr:last-child td {
    border-bottom: none;
}

.device-table-empty {
    padding: 1.5rem;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 10px;
}

.device-table-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
    padding: 0 8px;
}

.device-table-pagination button {
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 32px;
}

.device-table-pagination button:hover:not(:disabled) {
    background: #f0f7ff;
    border-color: #2d8998;
}

.device-table-pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

.device-table-pagination button.active {
    background: #2d8998;
    color: #ffffff;
    border-color: #2d8998;
}

/* ==================== DARK MODE ==================== */
@media (prefers-color-scheme: dark) {

    /* Backdrop */
    #infoPanelBackdrop {
        background: rgba(0, 0, 0, 0.8);
    }

    /* Info Panel */
    #infoPanel {
        background-image: none;
        background: var(--color-bg-input-disabled, #0a0b0c);
        border-left-color: var(--color-border, rgba(255, 255, 255, 0.12));
    }

    .info-panel-content {
        background: var(--color-bg-input-disabled, #0a0b0c);
    }

    /* Header */
    .info-panel-header h2,
    .info-panel-title {
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-panel-close {
        color: var(--color-text-secondary, #cbd5e1);
        background: transparent;
    }

    .info-panel-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-text-primary, #e5e7eb);
    }

    /* Sections */
    .info-panel-section {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .info-panel-section-title {
        color: var(--color-text-primary, #e5e7eb);
        border-bottom-color: var(--color-border, rgba(255, 255, 255, 0.12));
    }

    /* Image section */
    .info-panel-image-section {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .info-panel-image {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .info-panel-image img {
        opacity: 0.9;
    }

    .info-panel-image-placeholder {
        background: #1a1d21;
        border-color: rgba(255, 255, 255, 0.2);
    }

    .info-panel-image-placeholder svg {
        fill: #64748b;
    }

    /* Info items */
    .info-item {
        background: var(--color-bg-input-disabled, #0a0b0c);
        border-color: var(--color-border-light, rgba(255, 255, 255, 0.08));
        border-left-color: var(--color-primary, #2d8998);
    }

    .info-item-label {
        color: var(--color-text-muted, #94a3b8);
    }

    .info-item-value {
        color: var(--color-text-primary, #e5e7eb);
    }

    /* File list */
    .info-file-item {
        background: var(--color-bg-input-disabled, #0a0b0c);
        border-color: var(--color-border-light, rgba(255, 255, 255, 0.08));
        border-left-color: var(--color-primary, #2d8998);
    }

    .info-file-item:hover {
        background: var(--color-bg-input, #111315);
    }

    .info-file-label {
        color: var(--color-primary, #2d8998);
    }

    .info-file-icon {
        background: #1a1d21;
        border-color: rgba(255, 255, 255, 0.12);
        color: #cbd5e1;
    }

    .info-file-name {
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-file-details {
        color: var(--color-text-muted, #94a3b8);
    }

    .info-file-size {
        color: var(--color-text-muted, #94a3b8);
    }

    /* Offset Editing */
    .offset-value:hover {
        background-color: rgba(45, 137, 152, 0.2);
    }

    .offset-input {
        background: #0f1113;
        border-color: #2d8998;
        color: #e5e7eb;
    }

    .offset-input:focus {
        background: #111315;
        box-shadow: var(--shadow-focus-glow);
        border-color: transparent;
    }

    .info-offset-save-btn {
        background: transparent;
        color: #4ade80;
    }

    .info-offset-save-btn:hover {
        background: rgba(74, 222, 128, 0.1);
    }

    /* Release Notes */
    .info-release-notes {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        color: var(--color-text-secondary, #cbd5e1);
    }

    .info-release-notes:hover {
        background: var(--color-bg-input, #111315);
    }

    /* Dark mode scrollbar */
    .info-release-notes::-webkit-scrollbar-thumb {
        background: #4a5568;
    }

    .info-release-notes::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }

    .info-release-notes-header {
        border-bottom-color: var(--color-border, rgba(255, 255, 255, 0.12));
    }

    .info-release-notes-title {
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-release-notes h1,
    .info-release-notes h2,
    .info-release-notes h3,
    .info-release-notes h4,
    .info-release-notes h5,
    .info-release-notes h6 {
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-release-notes strong,
    .info-release-notes .bold {
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-release-notes hr {
        border-top-color: rgba(255, 255, 255, 0.12);
    }

    .info-release-notes code {
        background: #1a1d21;
        color: #f472b6;
        border-color: rgba(255, 255, 255, 0.12);
    }

    .info-release-notes pre {
        background: #1a1d21;
        border-color: rgba(255, 255, 255, 0.12);
    }

    .info-release-notes pre code {
        color: #cbd5e1;
    }

    .info-release-notes blockquote {
        background: #0a0b0c;
        border-left-color: #2d8998;
        color: #94a3b8;
    }

    .info-release-notes a {
        color: #60a5fa;
        text-decoration: underline;
    }

    .info-release-notes a:hover {
        color: #93c5fd;
    }

    .info-release-notes p,
    .info-release-notes li {
        color: var(--color-text-secondary, #cbd5e1);
    }

    /* Release Notes Editor */
    .info-release-notes-editor {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        color: var(--color-text-primary, #e5e7eb);
    }

    .info-release-notes-editor:focus {
        background: var(--color-bg-input, #111315);
        box-shadow: var(--shadow-focus-glow);
        border-color: transparent;
    }

    /* Save button */
    .info-release-notes-save-btn {
        background: transparent;
        color: #4ade80;
    }

    .info-release-notes-save-btn:hover {
        background: rgba(74, 222, 128, 0.1);
    }

    /* Device Tables */
    .device-table-header {
        color: var(--color-text-secondary, #cbd5e1);
    }

    .device-table-filter label {
        color: var(--color-text-muted, #94a3b8);
    }

    .device-table-filter select {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        color: var(--color-text-primary, #e5e7eb);
    }

    .device-table-filter select:focus {
        box-shadow: var(--shadow-focus-glow);
        border-color: transparent;
        background: var(--color-bg-input, #111315);
    }

    .device-table-wrapper {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border-light, rgba(255, 255, 255, 0.08));
    }

    .device-table th {
        background: var(--color-bg-input-disabled, #0a0b0c);
        color: var(--color-text-primary, #e5e7eb);
        border-bottom-color: var(--color-border, rgba(255, 255, 255, 0.12));
    }

    .device-table td {
        color: var(--color-text-secondary, #cbd5e1);
        border-bottom-color: var(--color-border-light, rgba(255, 255, 255, 0.08));
    }

    .device-table tbody tr:hover {
        background-color: var(--color-bg-input, #111315);
    }

    .device-table-empty {
        color: var(--color-text-muted, #94a3b8);
    }

    /* Pagination */
    .device-table-pagination button {
        background: var(--color-bg, #0f1113);
        border-color: var(--color-border, rgba(255, 255, 255, 0.12));
        color: var(--color-text-secondary, #cbd5e1);
    }

    .device-table-pagination button:hover:not(:disabled) {
        background: var(--color-bg-input, #111315);
        border-color: var(--color-primary, #2d8998);
    }

    .device-table-pagination button.active {
        background: var(--color-primary, #2d8998);
        color: #ffffff;
        border-color: var(--color-primary, #2d8998);
    }

    /* Loading state */
    .info-panel-spinner {
        border-color: rgba(255, 255, 255, 0.1);
        border-top-color: #2d8998;
    }

    /* Error state */
    .info-panel-error {
        color: #f87171;
    }
}

/* ==================== FIRMWARE ACTIVITY SECTION ==================== */
.firmware-activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.firmware-activity-list::-webkit-scrollbar {
    width: 6px;
}

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

.firmware-activity-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.firmware-activity-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.firmware-activity-item {
    position: relative;
    padding: 8px 12px;
    margin-bottom: 6px;
    margin-right: 8px;
    border-radius: 6px;
    border-left: 3px solid;
    background: #f8f9fa;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    width: calc(100% - 8px);
}

.firmware-activity-item:hover {
    background: #f0f7ff;
    transform: translateX(4px);
}

.firmware-activity-item.activity-type-error {
    border-left-color: #f8a5a5;
    background: #fff5f5;
}

.firmware-activity-item.activity-type-error:hover {
    background: #ffe9e9;
}

.firmware-activity-item.activity-type-warning {
    border-left-color: #ffc470;
    background: #fffbf0;
}

.firmware-activity-item.activity-type-warning:hover {
    background: #fff4d9;
}

.firmware-activity-item.activity-type-info {
    border-left-color: #7ec8e3;
    background: #f0f9ff;
}

.firmware-activity-item.activity-type-info:hover {
    background: #e6f4fa;
}

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

/* Firmware Activity Type Badge */
.firmware-activity-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.firmware-activity-type.type-error {
    background: #f8a5a5;
    color: #8b4545;
}

.firmware-activity-type.type-warning {
    background: #ffc470;
    color: #8b6914;
}

.firmware-activity-type.type-info {
    background: #7ec8e3;
    color: #2d5f77;
}

/* Firmware Activity Content */
.firmware-activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Firmware Activity Message */
.firmware-activity-message {
    font-size: 11px;
    color: #4a5568;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.firmware-activity-message-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Firmware Activity Meta */
.firmware-activity-meta {
    display: flex;
    gap: 12px;
    font-size: 9px;
    color: #8b95a0;
    white-space: nowrap;
    flex-shrink: 0;
}

.firmware-activity-meta span {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Firmware Activity Timestamp */
.firmware-activity-timestamp {
    font-size: 9px;
    color: #8b95a0;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* Firmware Activity Pagination */
.firmware-activity-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.firmware-activity-pagination .pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.firmware-activity-pagination .pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.firmware-activity-pagination .pagination-btn.active {
    background: #2d8998;
    color: #ffffff;
    border-color: #2d8998;
}

.firmware-activity-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.firmware-activity-pagination .pagination-ellipsis {
    padding: 0 4px;
    color: #6b7280;
    font-size: 12px;
}

/* Make firmware activity items clickable */
.firmware-activity-item {
    cursor: pointer;
}

/* Responsive adjustments for firmware activity */
@media (max-width: 768px) {
    .firmware-activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .firmware-activity-content {
        width: 100%;
    }

    .firmware-activity-timestamp {
        align-self: flex-end;
        margin-top: 0;
    }

    .firmware-activity-pagination {
        gap: 2px;
    }

    .firmware-activity-pagination .pagination-btn {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 2px 6px;
    }
}