/* General Reset */
body,
html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Wrapper for Sidebar and Main Content */
#wrapper {
    display: flex;
    height: 100vh;
}

#header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    font-family: Arial, sans-serif;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid #444;
}

/* Optional: Styling for header links */
#header a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: bold;
    margin: 0 10px;
}

/* Sidebar */
#sidebar {
    background-color: #333;
    color: white;
    padding: 10px;
    box-sizing: border-box;
    order: 1; /* Sidebar below header */
}

/* Main Content */
#main {
    flex-grow: 1;
    background-color: #f4f4f4;
    order: 2; /* Main content below sidebar */
}

/* Sidebar Menu Links */
#sidebar ul {
    padding-inline-start: 20px;
}

#sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    transition: background 0.3s;
}

#sidebar a:hover {
    background-color: #575757;
}

#hxcontent {
    padding-left: 20px;
    padding-right: 20px;
}

/* Headers */
h1,
h2,
h3 {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Table Styles */
table {
    width: 100%; /* Ensure tables are responsive */
    border-collapse: collapse;
    margin: 20px 0;
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
}

table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

table thead td {
    background-color: #e0e0e0;
    color: #333;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    padding: 10px;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tr:hover {
    background-color: #ddd;
}

/* Buttons */
button {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #333;
}

/* Input Options */
.number-input {
    width: 50px;
}

/* Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.popup.hidden {
    display: none;
}
.popup-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
#popup-close {
    margin-top: 10px;
    padding: 5px 10px;
    border: none;
    background: #333;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

 /* Burger button */
#burger-button {
    display: none;
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001; /* Above everything else */
}

#burger-button:hover {
    background-color: #575757;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Stack sidebar and content vertically */
    #wrapper {
        flex-direction: column;
    }

    #sidebar {
        width: 100%; /* Full width on smaller devices */
    }

    #header {
        padding: 15px; /* Slightly smaller padding for the header */
    }

    table td, table thead td {
        font-size: 14px; /* Smaller font size for table cells */
        padding: 8px;
        min-height: 15px;
    }

    table thead{display:none}
    table, table tbody,table tr, table td{display:block}
    table tr{margin-bottom:26px}
    table td{padding-left:35%;text-align:left; position:relative}
    table td::before{content:attr(data-label); position:absolute;left:0;width:35%;padding-left:15px; font-size:14px;font-weight:bold;text-align:left}


    button {
        padding: 8px 12px; /* Smaller buttons for mobile */
        font-size: 14px;
    }

    /* Responsive sidebar */
    #sidebar {
        transition: transform 0.3s ease;
        transform: translateX(-100%); /* Initially hidden off-screen */
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 150px;
        z-index: 1000; /* Above main content */
    }

    #sidebar.active {
        transform: translateX(0); /* Slide into view */
    }

    /* Ensure the main content takes full width when the sidebar is hidden */
    #main {
        transition: margin-left 0.3s ease;
    }

    #sidebar.active + #main {
        margin-left: 150px;
    }

    #burger-button {
        display: block;
    }

    #sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    #sidebar h2 {
        text-align: right;
    }

    #sidebar.active {
        transform: translateX(0);
    }

    #main {
        margin-left: 0;
    }

    select {
        width: 100%; /* Limit the width */
    }

    select option {
        white-space: pre-wrap; /* Allow text to wrap */
        text-overflow: ellipsis;
    }
}
