/* Global body and html styles for history page */
body.history-page,
html.history-page {
    overflow: hidden;
    height: 100%;
}

/* History Page Styles */
.history-dashboard {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px); /* Subtract header and margins */
    min-height: 500px; /* Minimum height for smaller screens */
    position: fixed;
    top: 80px; /* Account for header height */
    left: 20px;
    right: 20px;
    overflow: hidden; /* Prevent dashboard from scrolling */
}

/* Variables needed for status colors */
:root {
    --expiring-color: #e67e22;
    --unknown-color: #9e9e9e;  /* Gray color for unknown status */
}

/* Search Container */
.search-container {
    flex: 0 0 auto;
    margin-bottom: 20px;
}

.query-bar {
    display: flex;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    align-items: stretch;
}

.query-bar:focus-within {
    /* border-color: var(--primary-color); */ /* Style moved */
    /* box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25); */ /* Style moved */
}

.search-input-wrapper {
    position: relative; /* For z-index */
    flex: 1;
    display: block;
    /* Add separators and initial transparent top/bottom for focus effect */
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;

    margin: 0;
    padding: 0; 
    box-sizing: border-box; /* Borders included in height/width */

    /* Adjust margins and height to make its border overlay query-bar's border on focus */
    margin-top: -1px;
    margin-bottom: -1px;
    height: calc(100% + 2px); /* Compensate for negative margins */

    transition: border-top-color 0.2s ease, border-bottom-color 0.2s ease, border-left-color 0.2s ease, border-right-color 0.2s ease, box-shadow 0.2s ease;
}

/* When richSearchInput (child of search-input-wrapper) is focused */
.search-input-wrapper:focus-within {
    border-top-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    border-left-color: var(--primary-color);
    border-right-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    z-index: 1; /* Ensure its borders and shadow are on top */
}

.query-bar input {
    width: 100%;
    height: 38px;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.query-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.query-bar input::placeholder {
    color: var(--secondary-text-color);
    opacity: 0.7;
}

/* Autocomplete styles */
.autocomplete-container {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: calc(100% - 58px); /* Adjust for search button width and gap */
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: none;
    margin-bottom: 15px;
    backdrop-filter: blur(4px);
}

.autocomplete-help {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1a4387 0%, #2563eb 50%, #1e429f 100%);
    text-align: center;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 5;
}

.autocomplete-help kbd {
    display: inline-block;
    padding: 2px 4px;
    font-size: 0.75rem;
    font-family: monospace;
    line-height: 1;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    margin: 0 2px;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover, 
.autocomplete-item.selected {
    background-color: rgba(42, 124, 223, 0.15);
    transform: translateX(3px);
}

.autocomplete-item.selected {
    border-left: 3px solid var(--primary-color);
    background-color: rgba(42, 124, 223, 0.2);
    font-weight: 500;
}

.autocomplete-item span {
    vertical-align: middle;
}

/* Syntax highlighting colors for autocomplete */
.autocomplete-field {
    color: var(--primary-color);
    font-weight: 600;
}

.autocomplete-operator {
    color: #1e68c5;
}

.autocomplete-value {
    color: var(--text-color);
}

.autocomplete-description {
    font-size: 0.85rem;
    color: var(--secondary-text-color);
    margin-top: 3px;
}

/* Highlighting layer */
.query-highlight {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 15px;
    font-size: 0.95rem;
    font-family: inherit;
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
    z-index: 2;
    /* Position highlight text */
    text-align: left;
    line-height: normal;
    box-sizing: border-box;
}

/* Use a different approach that won't mess with cursor position */
.search-input-wrapper input {
    color: var(--text-color);
}

/* The highlight elements need to be positioned as an overlay */
.query-highlight {
    color: transparent;
    mix-blend-mode: multiply;
}

.highlight-field {
    color: var(--primary-color) !important;
    font-weight: 600;
    background-color: rgba(42, 124, 223, 0.1);
    border-radius: 3px;
}

.highlight-operator {
    color: #1e68c5 !important;
}

.highlight-value {
    color: transparent !important;
}

/* Search button */
#searchBtn {
    padding: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    border-right: 1px solid var(--border-color);
    margin: 0;
}

#searchBtn:hover {
    background-color: #1e68c5;
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* Export button styling */
.btn-export {
    padding: 8px;
    background: linear-gradient(135deg, #e6a819 0%, #ffa500 50%, #e69500 100%);
    color: white;
    border: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.btn-export:hover {
    background: linear-gradient(135deg, #ffa500 0%, #ffb733 50%, #ffa500 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.export-icon {
    width: 20px;
    height: 20px;
}

/* Search Help Row */
.search-help-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

/* Search Help Section */
.search-help {
    position: relative;
}

.help-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--secondary-text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
}

.help-toggle:hover {
    color: var(--primary-color);
}

.help-content {
    display: none;
    position: fixed;
    top: 145px;
    left: 30px;
    right: 30px;
    z-index: 100;
    background-color: #2a2f45; /* Slightly blueish dark background to distinguish from main content */
    background-image: linear-gradient(to bottom right, #2a2f45, #252a3d);
    border: 1px solid #3273c4; /* Brighter blue border */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); /* Enhanced shadow */
    width: auto;
    max-height: calc(100vh - 225px);
    overflow-y: auto;
}

.help-content h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #3273c4; /* Match border color */
    padding-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.search-category {
    margin-bottom: 12px;
}

.search-category h5 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.help-content ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style-type: none;
}

.help-content ul li {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--secondary-text-color);
}

.help-content code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid rgba(42, 124, 223, 0.2);
    display: inline-block;
    margin: 3px 0;
    white-space: nowrap;
}

.help-content code .field-name {
    color: var(--primary-color);
    font-weight: 600;
}

.help-content code .operator {
    color: #1e68c5;
    font-weight: 600;
}

.help-content code .logical {
    color: #16a34a;
    font-weight: 600;
}

.help-content code .quoted {
    color: #e74c3b;
    font-style: italic;
}

.search-tip {
    margin-top: 16px;
    padding: 8px 12px;
    background-color: rgba(42, 124, 223, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.85rem;
    color: var(--text-color);
}

.search-tip strong {
    color: var(--primary-color);
}

/* Results info */
.results-info {
    color: var(--secondary-text-color);
    font-size: 0.85rem;
    text-align: right;
}

#resultCount {
    font-weight: 600;
    color: var(--primary-color);
}

/* Logs Container */
.logs-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Important for flexbox to respect child overflow */
}

/* Logs Table */
.logs-table {
    overflow-x: auto;
    overflow-y: hidden; /* Scroll happens in inner container */
    flex: 1; /* Take all available space */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--light-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0; /* Remove bottom margin since we removed pagination */
    overflow: hidden;
}

.table-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Critical for nested flex containers */
    display: flex;
    flex-direction: column;
    max-height: none; /* Remove any max-height constraints */
}

.table-scroll-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.logs-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

/* Ensure header columns and body columns align perfectly */
.logs-table thead th,
.table-scroll-container td {
    width: auto;
}

.logs-table thead th:first-child,
.table-scroll-container td:first-child {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* Remove the overflowing tbody style as we now have a dedicated scroll container */
.logs-table tbody {
    /* Removed overflow-y: auto and flex: 1 as they're now on the container */
}

/* Sticky header */
.logs-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Add gradient background to the header row */
.logs-table thead tr {
    background: linear-gradient(135deg, #1a4387 0%, #2563eb 50%, #1e429f 100%);
}

/* Update table header styles */
.logs-table th {
    background-color: transparent; /* Let gradient show through */
    padding: 14px 15px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    position: relative;
    text-align: center;
}

/* Sortable table headers */
.logs-table th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background-color 0.2s;
}

.logs-table th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

.sort-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logs-table th:nth-child(2) .sort-header,
.logs-table th:nth-child(3) .sort-header,
.logs-table th:nth-child(4) .sort-header {
    justify-content: flex-start;
}

/* Add this new rule to left-align sort-header content for Start Time, End Time, Duration */
.logs-table th:nth-child(5) .sort-header,
.logs-table th:nth-child(6) .sort-header,
.logs-table th:nth-child(7) .sort-header {
    justify-content: flex-start;
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    position: relative;
}

th.sorting-asc .sort-icon:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid white;
}

th.sorting-desc .sort-icon:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white;
}

/* Text-based columns (name, url, tags) alignment */
.logs-table th:nth-child(2),
.logs-table th:nth-child(3),
.logs-table th:nth-child(4) {
    text-align: left;
}

/* Data columns remain center-aligned */
.logs-table th:nth-child(5),
.logs-table th:nth-child(6),
.logs-table th:nth-child(7) {
    text-align: left;
}

.logs-table td:nth-child(5),
.logs-table td:nth-child(6),
.logs-table td:nth-child(7) {
    text-align: left;
}

/* Ensure alignment between header and body */
.logs-table thead th,
.table-scroll-container td {
    width: auto;
    text-align: center;
}

/* Rounded corners for header */
.logs-table th:first-child {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
    border-top-left-radius: 8px;
}

/* Status column styling */
.logs-table td:first-child {
    position: relative;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: left;
    padding-left: 35px;
}

/* Text-based columns alignment */
.logs-table td:nth-child(2),
.logs-table td:nth-child(3),
.logs-table td:nth-child(4) {
    text-align: left;
}

/* Status text styling */
.status-text {
    display: inline-block;
    vertical-align: middle;
    font-weight: 500;
    white-space: nowrap;
    text-align: left;
}

/* Perfect status indicator positioning */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Make status indicators slightly larger on hover for interactivity */
tr:hover .status-indicator {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.log-row {
    transition: all 0.2s ease;
}

.log-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Remove zebra striping and ensure last row has no border */
.logs-table tr:last-child td {
    border-bottom: none;
}

/* Status-based background colors */
.log-row.error {
    background-color: rgba(255, 69, 58, 0.05);
}

.log-row.warning {
    background-color: rgba(255, 196, 0, 0.05);
}

.log-row.success {
    background-color: rgba(52, 199, 89, 0.05); /* Slightly greener for healthy status */
}

.log-row.expiring {
    background-color: rgba(230, 126, 34, 0.05);
}

.log-row.unknown {
    background-color: rgba(158, 158, 158, 0.05);
}

/* URL cell styling */
.url-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-cell a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.url-cell a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Status indicators and text */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.error {
    background-color: var(--danger-color);
    box-shadow: 0 0 5px rgba(255, 69, 58, 0.5);
}

.status-indicator.warning {
    background-color: var(--warning-color);
    box-shadow: 0 0 5px rgba(255, 196, 0, 0.5);
}

.status-indicator.success {
    background-color: var(--success-color);
    box-shadow: 0 0 5px rgba(0, 128, 0, 0.5);
}

.status-indicator.expiring {
    background-color: var(--expiring-color);
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.5);
}

.status-indicator.unknown {
    background-color: var(--unknown-color, #9e9e9e);
    box-shadow: 0 0 5px rgba(158, 158, 158, 0.5);
}

/* SSL Days styling */
.ssl-days-cell {
    white-space: nowrap;
}

.ssl-days {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.ssl-days.expiring {
    background-color: rgba(230, 126, 34, 0.2);
    color: var(--expiring-color);
    border: 1px solid rgba(230, 126, 34, 0.3);
}

/* Button with icon */
.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background-color: rgba(42, 124, 223, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.btn-icon:hover {
    background-color: rgba(42, 124, 223, 0.2);
}

/* Log Details Modal */
.log-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.log-detail-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: calc(33.33% - 10px);
}

.log-detail-row.full-width {
    width: 100%;
}

.detail-label {
    color: var(--secondary-text-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-color);
    font-size: 0.9rem;
    word-break: break-word;
}

.detail-value pre {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
    font-family: monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    max-height: 300px;
}

/* Modal styling */
.modal-card-head, 
.modal-card-foot {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.modal-card-title {
    color: var(--text-color);
}

.modal-card-body {
    background-color: var(--card-bg);
}

.button {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.button.is-primary {
    background-color: var(--primary-color);
    border-color: transparent;
    color: white;
}

.button.is-primary:hover {
    background-color: #1e68c5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .query-bar {
        flex-direction: column;
    }
    
    .search-help-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .results-info {
        text-align: left;
    }
    
    .help-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 100;
    }
    
    .search-categories {
        grid-template-columns: 1fr;
    }
    
    .log-detail-row {
        width: 100%;
    }
}

/* Search input highlighting */
.query-bar input::placeholder {
    color: var(--secondary-text-color);
    opacity: 0.7;
}

/* Style for the search input to support colored text spans */
.search-input-wrapper {
    position: relative;
    flex: 1;
    display: block;
}

/* Special colored tag styling */
.tag-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Operator highlighting */
.operator-highlight {
    color: #1e68c5;
    font-weight: 600;
}

/* Logical operator highlighting */
.logical-highlight {
    color: #16a34a;
    font-weight: 600;
}

/* Quoted string highlighting */
.quoted-highlight {
    color: #e74c3b;
    font-style: italic;
}

/* Content editable div styling - will look like the input but support rich text */
#richSearchInput {
    width: 100%;
    /* height: 38px; */ /* Original fixed height */
    height: 100%; /* Fill the adjusted height of search-input-wrapper */
    padding: 8px 15px;
    /* background-color: rgba(0, 0, 0, 0.2); */ /* Handled by .query-bar */
    background-color: transparent; /* Show query-bar background */
    border: none;
    border-radius: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    overflow: hidden;
    white-space: nowrap;
    outline: none;
    line-height: 22px; /* Align text vertically */
    box-sizing: border-box; /* Ensure padding is included in height */
    position: relative; /* For positioning the ghost overlay */
    /* transition: border-color 0.2s ease, box-shadow 0.2s ease; */ /* Handled by .search-input-wrapper:focus-within */
}

#richSearchInput:focus {
    /* border-color: var(--primary-color); */ /* Handled by .search-input-wrapper:focus-within */
    /* box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25); */ /* Handled by .search-input-wrapper:focus-within */
    outline: none; /* Ensure no default focus outline if border is removed */
}

/* Hide the original input but keep it in DOM for form submission */
#searchQuery {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Content editable placeholder */
#richSearchInput[contenteditable=true]:empty:before {
    content: attr(data-placeholder);
    color: var(--secondary-text-color);
    opacity: 0.7;
    pointer-events: none;
    display: block;
}

/* Tags styling */
.tags-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.tag-badge {
    display: inline-block;
    padding: 3px 6px;
    margin: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
}

.no-tags {
    color: var(--secondary-text-color);
    font-style: italic;
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tags-cell {
        max-width: 100px;
    }
    
    .tag-badge {
        padding: 2px 4px;
        font-size: 0.7rem;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .logs-table th:nth-child(5),
    .logs-table td:nth-child(5),
    .logs-table th:nth-child(6),
    .logs-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 768px) {
    .logs-table th:nth-child(4),
    .logs-table td:nth-child(4) {
        display: none;
    }
    
    .logs-table td:first-child {
        padding-left: 30px;
    }
    
    .status-indicator {
        left: 10px;
    }
}

/* Align the time columns to center */
.logs-table th:nth-child(5),
.logs-table td:nth-child(5),
.logs-table th:nth-child(6),
.logs-table td:nth-child(6),
.logs-table th:nth-child(7),
.logs-table td:nth-child(7) {
    text-align: left;
}

/* Status column specific alignment */
.logs-table th:first-child {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center; /* Keep header centered */
    border-top-left-radius: 8px;
}

.logs-table th:last-child {
    border-top-right-radius: 8px;
}

/* Ensure Name, URL, and Tags columns are consistently left-aligned */
.logs-table th:nth-child(2),
.logs-table td:nth-child(2),
.logs-table th:nth-child(3),
.logs-table td:nth-child(3),
.logs-table th:nth-child(4),
.logs-table td:nth-child(4) {
    text-align: left;
}

/* Cell styling */
.logs-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    vertical-align: middle;
    height: 52px;
}

/* Remove pagination-related styles */
tr.page-hidden {
    display: none !important;
}

tr.page-visible {
    display: table-row;
}

/* No logs message */
.no-logs-message {
    padding: 30px !important;
    text-align: center;
    color: var(--secondary-text-color);
    font-style: italic;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Clear button styling */
.btn-clear {
    padding: 8px;
    background: linear-gradient(135deg, #444444 0%, #666666 50%, #444444 100%);
    color: white;
    border: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #555555 0%, #777777 50%, #555555 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clear-icon {
    width: 18px;
    height: 18px;
}

/* Ghost text overlay styling */
.ghost-overlay {
    font-family: inherit;
    font-size: inherit;
    white-space: nowrap;
    word-wrap: break-word;
    z-index: 2;
    pointer-events: none;
}

.ghost-content {
    padding: 8px 15px;
    line-height: 22px;
}

.ghost-typed {
    color: transparent;
}

.ghost-suggestion {
    color: #888;
    opacity: 0.9;
    font-weight: 400;
}
