/* Variables */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f2f2f2;
    --primary-text: #333333;
    --secondary-text: #555555;
    --border-color: #dddddd;
}

[data-theme='dark'] {
    --primary-bg: transparent;
    --secondary-bg: #555555;
    --primary-text: #ffffff;
    --secondary-text: #dddddd;
    --border-color: #444444;
}

/* Reset and global styles */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--primary-bg);
    color: var(--primary-text);
}

input, button {
    border-radius: 5px;
    border: none; /* Remove the border to improve button appearance */
}

/* Main layout */
main {
    padding: 20px;
    padding-bottom: 60px; /* Add space for the footer */
}

header, footer {
    background-color: rgba(255, 255, 255, 0.7);
    width: 100%;
    z-index: 1; /* Ensure the header and footer are above other content */
}

footer {
    position: relative; /* Change to relative position */
    height: 2.5rem;
    clear: both;
    text-align: center;
    line-height: 2.5rem;
    font-size: 0.8rem;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: flex-end;
    background-color: var(--secondary-bg);
    border-radius: 5px;
}

.nav button {
    background: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 0; /* Reset margin to remove extra space between buttons */
    font-size: 16px;
    color: var(--primary-text);
    outline: none; /* Remove the default outline */
    transition: color 0.3s; /* Add a color transition */
}

/* Search box */
.search-box {
    display: flex;
    align-items: center;
    margin: 10px;
}

/* Table and list views */
table, #history-list {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid var(--border-color);
    text-align: left;
    padding: 8px;
    background-color: var(--secondary-bg);
}

#table {
    animation: fadeIn 0.5s;
}

#history-list {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s;
}

.fab:hover {
    background-color: var(--secondary-text);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input, .search-box button {
        margin: 5px 0;
    }
}

/* Dark Mode Specific */
[data-theme='dark'] header, [data-theme='dark'] footer, [data-theme='dark'] body, [data-theme='dark'] th, [data-theme='dark'] td {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    align-items: center;
}

/* Reset styles for the navigation buttons */
.nav-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 0; /* Reset margin to remove extra space between buttons */
    font-size: 16px;
    color: var(--primary-text); /* Set text color */
    outline: none; /* Remove the default outline */
    transition: color 0.3s; /* Add a color transition */
}

/* Apply active styles to the active button */
.nav-link.active {
    color: var(--primary-text); /* Set the active button's text color */
}

/* Hover styles for the navigation buttons */
.nav-link:hover {
    color: var(--secondary-text); /* Change text color on hover */
}

/* Description Section */
.description-section {
    padding: 20px; /* Add padding to separate content from the footer */
}
.visually-hidden { 
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important; 
    width: 1px !important; 
    overflow: hidden;
}
