/* styles.css */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f7f6;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

h1 {
    height: 40px;
    margin: 0;
    padding: 15px;
    background-color: #007ac3;
    color: white;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-input {
    width: 150px; /* Set the width of the input */
    padding: 10px 15px; /* Padding inside the input */
    font-size: 16px; /* Font size for readability */
    border: 1px solid #ccc; /* Light border */
    border-radius: 25px; /* Rounded corners for a modern look */
    outline: none; /* Remove default outline */
    transition: all 0.3s ease; /* Smooth transition for border and shadow */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding-right: 40px; /* Add padding to the right to make space for the icon */
}

.filter-input::placeholder {
    color: #999; /* Slightly lighter placeholder color */
}

.filter-input:focus {
    border-color: #3498db; /* Change border color on focus */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Enhance shadow on focus */
    background-color: #f4f7f6; /* Slight background change on focus */
}

.clear-icon {
    position: absolute;
    right: 10px; /* Adjust as needed */
    top: 54%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 24px;
    color: #999; /* Color of the icon */
    display: none; /* Initially hidden */
    pointer-events: all; /* Ensure it can be clicked */
}

.clear-icon:hover {
    color: #3498db; /* Change color on hover */
}

.toggle-container {
    display: flex;
    align-items: center;
    margin: 10px 0; /* Adjust margin as needed */
}

.toggle-label {
    font-size: 16px; /* Adjust font size as needed */
    /* margin: 0 10px; Space between labels and toggle */
}

.toggle-label.active {
    color: gold; /* Color when active */
}

.toggle-input {
    appearance: none; /* Remove default checkbox styling */
    width: 35px; /* Width of the toggle */
    height: 18px; /* Height of the toggle */
    background-color: #ccc; /* Background color when off */
    border-radius: 25px; /* Rounded corners */
    position: relative;
    outline: none; /* Remove outline */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s; /* Smooth transition */
}

.toggle-input:checked {
    background-color: #007bff; /* Change background color when checked */
}

#lpCheckboxDiv {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
    margin-right: 15px; /* Optional: space between this and other elements */
}

.toggle-input:checked {
    background-color: #ccc; /* Background color when on */
}

/* Change label color when checkbox is checked */
.toggle-input:checked + .toggle-label {
    color: gold; /* Change label color to gold */
}

.toggle-input:checked::before {
    transform: translateX(18px); /* Move the toggle knob */
}

.toggle-input::before {
    content: '';
    position: absolute;
    width: 16px; /* Width of the toggle knob */
    height: 16px; /* Height of the toggle knob */
    background-color: white; /* Color of the toggle knob */
    border-radius: 50%; /* Rounded knob */
    transition: transform 0.3s; /* Smooth transition */
    top: 1px; /* Positioning the knob */
    left: 1px; /* Positioning the knob */
}

.delete-button {
    background-color: #e74c3c; /* Primary button color */
    color: white; /* Text color */
    border: none; /* Remove default border */
    padding: 10px 20px; /* Padding for the button */
    font-size: 16px; /* Font size */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
    margin-left: 20px; /* Space from the filter input */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.delete-button:hover {
    background-color: #c0392b; /* Darker shade on hover */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Deeper shadow on hover */
}

.delete-button:active {
    background-color: #a93226; /* Even darker shade when active */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Pressed-in effect */
    transform: translateY(2px); /* Button pressed down effect */
}

.delete-button:disabled {
    background-color: #ccc; /* Gray out the button */
    cursor: not-allowed; /* Change the cursor to indicate it's disabled */
    opacity: 0.6; /* Lower opacity for a disabled effect */
}

.more-button {
    background-color: transparent;
    border: none;
    cursor: pointer; /* Pointer cursor on hover */
    padding: 0; /* Remove padding */
    color: #ffffff;
    font-size: x-large;
}

#more-icon {
    border-radius: 5px;
}

#more-icon:hover {
    background-color: #cccccc; /* Highlight on hover */
}

.more-menu {
    display: none;
    position: absolute; /* Positioning */
    top: -36px;
    right: 6px;
    background-color: #e9e9e9; /* Background color */
    color: #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Shadow for depth */
    border: solid 1px #cccccc;
    border-radius: 5px; /* Rounded corners */
    z-index: 10; /* Ensure it appears above other elements */
    right: 0; /* Align to the right */
    margin-top: 100px; /* Space between button and menu */
}

.more-menu-item {
    padding: 10px 25px; /* Padding for menu items */
    cursor: pointer; /* Pointer cursor on hover */
    font-size: small;
}

.more-menu-item:hover {
    background-color: #cccccc; /* Highlight on hover */
}

.menu-separator {
    margin: 0;
    background-color: green;
}

#versionInfo:hover {
    background-color: #aaaaaa;
    cursor:default;
}

.container {
    flex: 1;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 400px; 
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0;
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;
    overflow-x: auto;
}

.table-container {
    height: 100%; /* Adjust the height as needed */
    overflow: auto; /* Enable scrolling */
}

table th {
    position: sticky;
    top: 0;
    z-index: 2; /* Ensure headers are above other content */
    background-color: #007ac3; /* Ensure background color is set */
    color: white; /* Text color */
}

#searchTable {
    width: 100%; /* Make the table take full width */
    table-layout: fixed;
}


/* #searchTable th, #searchTable td {
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
} */

/* .url-column {
    max-width: 200px;
    width: 1%;
} */

table, th, td {
    border: none;
}

th, td {
    padding: 12px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    position: relative;
}

th {
    background-color: #007ac3;
    color: white;
    position: relative;
}

th .resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #3498db;
    cursor: col-resize;
    z-index: 1;
}

#searchTable .select-all-header {
    width: 20px; /* Set width for select-all-header */
}

#searchTable #searchIdHeader {
    width: 30px; /* Set width for searchIdHeader */
}

#searchTable #searchDateHeader {
    width: 100px; /* Set width for searchDateHeader */
}

#searchUrlHeader {
    overflow-wrap: break-word;
}

#searchTable .url-column,
.urlCell {
    word-wrap: break-word; /* Allow long words to break and wrap */
    white-space: normal; /* Allow normal wrapping */
    overflow-wrap: break-word; /* Break words if necessary */
    max-width: 200px; /* Ensure it doesn't exceed the column width */
}

#searchTermHeader{
    width: 20%;
}

tbody tr:nth-child(even) {
    background-color: #e9e9e9;
}

tbody tr:hover {
    background-color: #cccccc;
    transition: background-color 0.3s ease;
}

td.url-column {
    word-break: break-word; /* Allow wrapping on slashes */
    white-space: pre-wrap;  /* Preserve whitespace and wrap */
}

td.url-column a {
    word-wrap: break-word; /* Break the word on slashes */
    white-space: pre-wrap; /* Preserve whitespace and wrap */
}

.select-all-header,
.selectCell,
.searchIdHeader,
.idCell {
    max-width: 100px;
}

.row-select, .row-select-search, #selectAll, #selectAllSearch {
    cursor: pointer;
}

.url-column a {
    color: #0066cc;
    text-decoration: none;
}

.url-column a:hover {
    text-decoration: underline;
}

.resolved-cell {
    text-align: center;
}

.resolved-checkbox {
    margin: 0;
    vertical-align: middle;
    cursor: pointer;
}

.notes-cell {
    width: auto;
    min-width: 200px; /* Adjust this value as needed */
}

.notes-textarea {
    width: 100%;
    height: 90px;
    min-height: 90px;
    resize: vertical;
    padding: 5px;
    box-sizing: border-box;
    font-size: small;
    font-family: "Segoe UI", ui-sans-serif;
}

/* Optional: Style for when a row is selected */
tr:has(.row-select:checked), tr:has(.row-select-search:checked) {
    background-color: rgba(133, 188, 32, 0.5);
}

@media (max-width: 768px) {
    .filter-input {
        width: 100%; /* Responsive width on smaller screens */
        margin-bottom: 10px; /* Space below the input */
    }
    
    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px;
    }
}

/* #region SKELETON STYLES */
.skeleton {
    background-color: #ddd;
    border-radius: 4px;
    min-height: 20px;
}

.skeleton-table-cell {
    width: 100%;
    height: 20px;
    margin: 10px 0;
    background-color: #ddd;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-table-cell::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ddd, #eee, #ddd);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.skeleton-table th,
.skeleton-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.skeleton-table th {
    background-color: #adadad;
    height: 24px;
}

.skeleton-cell {
    background-color: #e0e0e0; /* Light gray for skeleton */
    height: 20px; /* Height of the skeleton cell */
    margin: 5px 0; /* Space between cells */
    animation: pulse 1.5s infinite; /* Animation for loading effect */
}
/* #endregion */


/* #region CHANGELOG */
#changelog {
    position: fixed;
    top: 50%;
    right: -500px; /* Start off-screen */
    transform: translateY(-50%);
    width: 500px;
    height: 60%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 4px solid #007ac3;
}

#changelog.active {
    right: 0; /* Slide in */
}

#changelogClose {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 40px;
}

#changelog h2 {
    margin-block-start: 0;
}

#changelog h3 {
    margin-block-end: 0;
    font-size: medium;
}

#changelog ul {
    margin-block-start: 0;
}

/* Collapsible ToDo Section */
.collapsible-header {
    background-color: #007ac3;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s;
}

.collapsible-header:hover {
    background-color: #005f8a;
}

.collapsible-header.active {
    background-color: #005f8a;
}

.collapsible-content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f4f7f6;
}
/* #endregion */



@keyframes pulse {
    0% {
        background-color: #e0e0e0;
    }
    50% {
        background-color: #d0d0d0; /* Slightly darker gray */
    }
    100% {
        background-color: #e0e0e0;
    }
}

@keyframes loading {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}
/* #endregion */