﻿body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; /* Remove fixed margin, use padding instead */
    background-color: #f4f4f4;
    padding: 1rem; /* Use rem for responsive padding */
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.table-container {
    max-width: 100%; /* Prevents table from exceeding container width */
    overflow-x: auto; /* Adds horizontal scroll if table is wider than container */
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table {
    overflow-x: auto; /* Adds horizontal scroll if content exceeds container width */
    display: block; /* For better responsiveness */
}

    .responsive-table th,
    .responsive-table td {
        padding: 8px;
        /*text-align: left;*/
        border: 1px solid #ddd; /* Adds borders to table cells */
    }

    .responsive-table th,
    .responsive-table td {
        /*white-space: nowrap;*/ /* Prevents text from wrapping */
        /*max-width: 250px;*/ /* Set maximum width for these columns */
        overflow: hidden; /* Hide overflow content */
        /*text-overflow: ellipsis;*/ /* Adds ellipsis (...) for overflowed text */
    }

@media (max-width: 600px) {
    .responsive-table th,
    .responsive-table td {
        font-size: 12px; /* Adjusts font size for smaller screens */
        padding: 6px; /* Reduces padding for smaller screens */
    }
}

.item-selection-container {
    max-width: 300px;
}

.selected-items-list {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}

.selected-item {
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.selected-item {
    display: inline-block;
    /*background-color: #e2e6ea;*/
    padding: 3px 8px;
    margin: 2px;
}

.selected-items-container {
    margin-bottom: 5px;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 !important;
}

.item-description {
    color: #000000;
    font-weight: 500;
}

.input-group {
    display: flex;
    align-items: start;
    gap: 8px;
    margin: 0 !important;
}

.PurchasedQuantity-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: start;
    margin: 0 !important;
}

.PurchasedQuantity-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.brand-input {
    flex: 1;
    min-width: 120px;
    color: #6c757d;
    font-weight: 500;
}

.PurchasedQuantity-info {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.available-text {
    color: #6c757d;
}

.error-message {
    color: #dc3545;
}

.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.PurchasedQuantity-input.invalid:focus,
.brand-input.invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    outline: none;
}

.remove-button {
    padding: 4px 8px;
    font-size: 0.875rem;
}

.document-list {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}

.document-item {
    margin-bottom: 4px;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-name {
    font-weight: 500;
    color: #000000;
}

.item-details {
    color: #6c757d;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 4px;
}

.new-work-row {
    background-color: #f8f9fa;
}


.remove-item, li span {
    margin-left: 5px;
    cursor: pointer;
    color: #dc3545;
}
/* Table headers */
th.name-header {
    border-right: none; /* Remove right border for the "Name" header */
}

th.details-header {
    border-left: none; /* Remove left border for the empty header in the second row */
}

/* Headings */
h2 {
    color: #333;
}

/* Paragraphs and divs */
p, div {
    margin-bottom: 1rem; /* Use rem for responsive margin */
}

/* Labels */
label {
    margin-right: 10px;
}

/* Inputs and selects */
input[type="text"], select {
    padding: 8px;
    margin-top: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem; /* Use rem for responsive font size */
}

/* Buttons */
button {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem; /* Use rem for responsive font size */
}

    button:hover {
        background-color: #0056b3;
    }

/* Table */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem; /* Use rem for responsive margin */
}

a span {
    color: #000;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

th {
    background-color: #007bff;
    color: #fff;
}

/* Object (adjust as needed) */
object {
    width: 100%; /* Maintain full width */
    display: block;
}

td:last-child {
    text-align: center;
}

tr:hover {
    background-color: #f5f5f5;
}

/* Specific classes */
.filter-control {
    display: inline-block; /* Change to 'inline-block' or another display value as needed */
    width: auto; /* Use 'auto' or adjust width as needed */
}

.margin-left {
    margin-left: 0.5rem; /* Use rem for responsive margin */
}

.margin-right {
    margin-right: 0.5rem; /* Use rem for responsive margin */
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: #fff;
    z-index: 1;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    /*max-width: 80%;
    width: 50%;*/

    @media only screen and (max-width: 768px) {
        width: 90%; /* Adjust width for smaller screens */
    }
}

.user-profile-header {
    display: flex;
    align-items: center;
}

.profile-icon {
    font-size: 24px;
    margin-right: 10px;
}

.username {
    margin-right: 10px;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    right: 0;
    left: auto;
}

    .dropdown-menu.show, .show {
        display: block;
    }

.dropdown-item {
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .dropdown-item:hover {
        background-color: #f1f1f1;
    }

.dropdown-toggle {
    width: 100%;
}

.purchases-list {
    max-height: 400px;
    overflow-y: auto;
}

.btn-group, .btn-group-vertical {
    display: block;
}

.filter-container {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: white;
}

    .filter-container > div {
        margin-left: 10px;
        margin-right: 10px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

.dropdown-menu {
    position: relative;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    padding-top: 0;
}

.dropdown-item {
    user-select: none;
}

.dropdown-toggle::after {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    margin-top: -2px;
}

.btn.dropdown-toggle {
    --bs-btn-hover-color: var(--bs-btn-color);
    --bs-btn-hover-bg: var(--bs-btn-bg);
    --bs-btn-hover-border-color: var(--bs-btn-border-color);
    --bs-btn-active-color: var(--bs-btn-color);
    --bs-btn-active-bg: var(--bs-btn-bg);
    --bs-btn-active-border-color: var(--bs-btn-border-color);
}

    .btn.dropdown-toggle.show {
        color: var(--bs-btn-color);
        background-color: var(--bs-btn-bg);
        border-color: var(--bs-btn-border-color);
        overflow: visible;
        z-index: 1000;
    }

.purchase-entry {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.PurchasedQuantity-input, .price-input {
    width: 100%;
}

.documents {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.purchase-summary {
    padding: 8px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    border-radius: 4px;
}

.remove-item {
    margin-left: 5px;
    cursor: pointer;
    color: #dc3545;
}

.dropdown-div {
    overflow: visible !important;
    z-index: 1000;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    overflow: auto;
}

/* Add this style to make the modal overlay visible when the modal is opened */
.modal.active {
    display: block !important;
}

.modal-overlay.active {
    display: block !important;
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Use auto for vertical centering */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Adjusted for better responsiveness */

    @media only screen and (max-width: 768px) {
        width: 95%; /* Adjust width for smaller screens */
    }
}

.close {
    color: #fff;
    float: right;
    font-weight: bold;
    cursor: pointer;
}

    .close:hover,
    .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }

/* Search bar */
.search-bar {
    display: flex;
    flex-wrap: wrap; /* Wrap elements on smaller screens */
    margin-bottom: 1rem; /* Use rem for responsive margin */
}

    .search-bar input,
    .search-bar button {
        flex: 1 1 auto; /* Equal width distribution with min and max width of auto */
        margin-right: 1rem; /* Add margin for spacing */
        padding: 0.5rem 1rem; /* Adjust padding as needed */
    }

@media only screen and (max-width: 768px) {
    .search-bar input,
    .search-bar button {
        flex: 1 0 auto; /* Change to 'flex: 1 0 auto' for 3 lines on small screens */
    }
}
/*nav {
    background-color: #333;
    padding: 0.5rem 1rem;*/ /* Use rem for responsive padding */
/*}

ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

li {
    float: left;
    margin-right: 1rem;*/ /* Use rem for responsive margin */
/*}*/

/*a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

    a:hover {
        background-color: #111;
    }*/

/*.right {
    float: right;
}*/

/* Base nav styles */
nav {
    background-color: #333;
    /*overflow: hidden;*/
}

    nav ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
    }

        nav ul li {
            position: relative;
            display: inline-block;
        }

            nav ul li a {
                display: block;
                color: white;
                padding: 14px 20px;
                text-decoration: none;
                font-weight: bold;
            }

                nav ul li a:hover {
                    background-color: #575757;
                }

        /* Hide nested ul */
        nav ul ul {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            background-color: #333;
            padding-left: 0;
            z-index: 1;
        }

        /* Show the nested ul when parent li is hovered */
        nav ul li:hover > ul {
            display: block;
        }

        nav ul ul li {
            display: block;
            width: 100%;
        }

            nav ul ul li a {
                padding: 10px;
            }

/* Right aligned menu item */
.right {
    float: right;
}

/* Responsiveness */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

        nav ul li {
            display: block;
        }

        nav ul ul {
            position: relative;
        }
}
