/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 70px; /* Prevent overlap with fixed header */
}
html {
    height: 100%;
}
h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Header Styles */
.header {
    display: flex;
    align-items: center; /* Vertically align items */
    justify-content: space-between; /* Spread items across the header */
    padding: 10px 20px;
    background-color: #f4f4f9;
    border-bottom: 1px solid #ddd;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    z-index: 1000; /* Keep header on top */
    box-sizing: border-box;
}
.logo {
    height: 50px; /* Adjust size */
    margin-right: 20px;
}
.title-container {
    flex: 1; /* Take up all available space */
    text-align: center; /* Center the title */
}
#dashboard-title {
    font-size: 1.8em;
    color: #333;
    margin: 0;
}

/* Control Panel Styles */
.control-panel {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.row {
    display: flex;
    flex-wrap: nowrap; /* Keep items in one line */
    align-items: center; /* Vertically align items */
    gap: 10px;
}
.row label {
    font-weight: bold;
    color: #333;
    margin-right: 5px;
    white-space: nowrap; /* Prevent labels from wrapping */
}

/* Dropdown and Input Styles */

/* Dropdown styling for log type */
#log-type-dropdown {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 80px; /* Adjust minimum width */
}

/* Dropdown styling for log files */
#log-files-dropdown {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 150px; /* Adjust minimum width */
}

/* Input styling for number of logs */
#log-count-input {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 60px;
    text-align: center;
}

/* Input styling for search */
#search-input {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 200px;
}

/* Input styling for refresh interval */
#refresh-interval-input {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 80px;
    text-align: center;
}

/* Icon Button Styles */
.icon-button {
    padding: 8px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-size: 1.2em; /* Icon size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    line-height: 1; /* Align icon vertically */
    height: 40px; /* Set consistent height */
    width: 40px; /* Set consistent width */
    margin-top: 2px; 
}
.icon-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}
.icon-button i {
    pointer-events: none; /* Prevent click events on the icon itself */
}

/* Log Container Styles */
#log-container {
    width: 90%; /* Relative to the viewport width */
    max-width: 1400px; /* Maximum width for larger screens */
    height: calc(70vh); /* Set height to 70% of the viewport height */
    overflow-y: auto; /* Add vertical scrolling for overflowing content */
    overflow-x: hidden; /* Disable horizontal scrolling */
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fefefe;
    padding: 15px;
    font-family: monospace;
    font-size: 1.0em;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    line-height: 1.6; /* Adjusted line spacing for readability */
    margin: auto;
}
#log-container p {
    margin: 0;
    padding: 3px 0;
}

/* Highlighted Text */
.highlight {
    background-color: yellow;
    color: black;
}

/* Responsive Design */
@media (max-width: 768px) {
    .row {
        flex-wrap: wrap; /* Stack items vertically on smaller screens */
        gap: 10px;
    }
    .icon-button {
        font-size: 1.2em; /* Reduce icon size for smaller screens */
    }
}

/* Adjust label styling for compact layout */
label {
    font-weight: normal; /* Reduce weight for compact appearance */
    font-size: 0.95em; /* Decrease font size */
    margin-right: 5px; /* Reduce spacing between label and input */
    white-space: nowrap; /* Prevent labels from wrapping */
}

/* Chatbot Icon */
#chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
}

#chatbot-icon:hover {
    background-color: #0056b3;
}

/* Chatbot Popup Form */
#chatbot-popup {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: none; /* Hidden by default */
    opacity: 0; /* Invisible initially */
    transition: opacity 0.3s ease-in-out; /* Smooth fade effect */
    z-index: 1000;
}

#chatbot-popup.show {
    display: block;
    opacity: 1; /* Fully visible */
}


#chatbot-popup h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #333;
}

#chatbot-popup label {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

#chatbot-popup input,
#chatbot-popup textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
}

#chatbot-popup button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

#chatbot-popup button:hover {
    background-color: #0056b3;
}
