﻿.table-wrapper {
    width: 100%;
    font-size: 1.2em;
}

#full-container {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

    #full-container .container-fluid.table-container {
        width: 100%;
        max-width: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start;
        padding-top: 10px;
    }

.table-panel {
    width: 100% !important;
    max-width: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex: 1 !important;
    min-width: 0;
    display: block;
    order: 2;
}

.filter-panel {
    background-color: #1a1a1a;
    padding: 10px;
    width: 15%;
    min-width: 120px;
    height: max-content;
    border: 1px solid #333333;
    border-radius: 0.25rem;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-shrink: 0 !important;
    text-wrap: wrap;
    order: 1;
}

.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 40px;
    z-index: 1080 !important;
    background-color: #16697a;
    color: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
}

    .mobile-filter-toggle:hover {
        background-color: #458795;
    }

.filter-title {
    color: #f0f0f0;
    padding-bottom: 10px;
}

.filter-item {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.productTable-title {
    font-size: 2rem;
    margin: 0;
    color: #f0f0f0;
}

.container-fluid.table-container {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: auto;
    background-color: transparent !important;
    margin-bottom: 25px;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

table.productTable {
    background-color: #252525 !important;
    font-size: 12px !important;
    table-layout: auto !important;
    width: max-content !important;
    flex-grow: 1;
    border-collapse: collapse !important;
    border: 1px solid #333333 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    display: table !important;
}

.productTable th {
    height: 20px !important;
    min-height: 20px !important;
    padding: 4px 6px !important;
    font-size: 18px !important;
    line-height: 16px !important;
    vertical-align: middle !important;
    background-color: #252525 !important;
    font-weight: bold;
    color: #f0f0f0;
    border: 1px solid #333333 !important;
    text-align: center !important;
    white-space: normal !important;
    align-content: center;
    display: table-cell;
}

    .productTable th a {
        text-decoration: none;
        color: #f0f0f0 !important;
        padding: 2px 6px;
        border-radius: 3px;
        display: inline-block;
        transition: background-color 0.2s ease;
    }

        .productTable th a:visited {
            color: #f0f0f0 !important;
        }

        .productTable th a:hover {
            background-color: #4a90e2;
            color: #ffffff !important;
        }

.description-col {
    width: auto;
    min-width: 500px;
    max-width: none;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
}

.productTable td.description-col {
    padding: 6px 15px !important;
    text-align: left;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.partNumber-col, .color-col, .connection-col, .material-col, .action-col {
    white-space: nowrap;
}

table.productTable td {
    background-color: inherit !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 6px 2px !important;
    font-size: 16px !important;
    line-height: 14px !important;
    vertical-align: middle !important;
    border: 1px solid #333333 !important;
    text-align: center;
    white-space: normal !important;
    color: #f0f0f0;
    display: table-cell;
}

table.productTable tr {
    background-color: inherit !important;
    height: 18px !important;
    min-height: 18px !important;
    line-height: 14px !important;
    display: table-row;
}

table.productTable tbody tr:nth-child(even) td {
    background-color: #1e1e1e !important;
}

table.productTable tbody tr:hover td {
    background-color: #3a5a78 !important;
    transition: background-color 0.2s ease;
}

.productTable tr {
    height: 18px !important;
    min-height: 18px !important;
    line-height: 14px !important;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #f0f0f0;
}

    .loading.active {
        display: block !important;
    }

.spinner {
    border: 4px solid #333333;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #f0f0f0;
    font-size: 1.1rem;
}

.filter-section {
    margin-bottom: 15px;
    border: 1px solid #333333;
    border-radius: 4px;
    overflow: hidden;
}

.filter-heading {
    font-size: 1.3em;
    background-color: #252525;
    padding: 8px 8px !important;
    font-weight: bold;
    color: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.2;
    min-width: max-content;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background-color: #1a1a1a;
}

.filter-option {
    display: flex;
    align-items: center;
    margin: 0.1rem 0;
    padding: 0;
    height: 20px;
    line-height: 1.2;
    cursor: pointer;
}

.filter-checkbox {
    margin-right: 8px;
    margin: 0;
    padding: 0;
    height: 16px;
    width: 16px;
    vertical-align: middle;
}

.filter-label {
    font-size: 1.6rem;
    margin-left: 0.2rem;
    padding: 0;
    line-height: 1.2;
    cursor: pointer;
    color: #f0f0f0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    justify-content: center;
}

    .filter-actions .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.9rem;
        background-color: #4a90e2;
        color: #ffffff;
        transition: background-color 0.2s ease;
    }

        .filter-actions .btn-sm:hover {
            background-color: #357abd;
        }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .pagination a {
        color: #f0f0f0 !important;
    }

        .pagination a:visited {
            color: #f0f0f0 !important;
        }

@media screen and (max-width: 1001px) {
    .productTable th.hide-on-medium,
    .productTable td.hide-on-medium {
        display: none !important;
    }
}

@media (max-width: 1310px) {
    .applied-filters {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #full-container {
        padding: 0 10px;
        max-width: 100%;
    }

    .container-fluid.table-container {
        overflow-x: auto !important;
        flex-direction: row !important;
    }

    .filter-panel {
        display: none !important;
        width: 100% !important;
        max-width: none;
    }

    .mobile-filter-toggle {
        display: block;
    }

        .mobile-filter-toggle:hover {
            background-color: #458795;
        }

    .filter-panel {
        display: block !important;
        position: fixed;
        top: 88px;
        left: -100%;
        width: 85%;
        height: calc(100vh - 88px);
        z-index: 1070 !important;
        transition: left 0.3s ease;
        overflow-y: auto;
        background-color: #1a1a1a;
        border-right: 1px solid #333333;
        padding: 20px;
        box-sizing: border-box;
    }

        .filter-panel.open {
            left: 0;
        }

    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1065 !important;
    }

        .filter-overlay.active {
            display: block;
        }

    .container-fluid.table-container {
        margin-right: 0;
    }

    #navbar {
        z-index: 1030 !important;
    }

    .nav-container, .logo-wrapper {
        z-index: 1030 !important;
    }

    .description-col {
        min-width: 100px;
        max-width: none;
        width: auto;
        overflow-wrap: break-word !important;
    }

    .productTable th, .productTable td {
        padding: 4px 2px !important;
        font-size: 14px !important;
    }

    .connection-col {
        min-width: 80px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .table-panel {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .productTable {
        width: 100% !important;
        table-layout: fixed !important;
    }

        .productTable th.hide-on-small, .productTable td.hide-on-small {
            display: none !important;
        }

    .container-fluid.table-container {
        max-width: 100% !important;
    }
}

.partNumber-col {
    min-width: 50px !important;
}

.description-col {
    width: auto;
    min-width: max-content !important;
}

.material-col {
    min-width: 145px !important;
}

.color-col {
    width: 145px !important;
}

.connection-col {
    width: 145px !important;
}

.filter-btn {
    height: 40px;
    background-color: #16697a;
    color: white;
    max-width: 50px;
}

    .filter-btn:hover {
        background-color: #458795;
        color: white;
    }

.filter-actions a.btn.filter-btn {
    color: white;
}

    .filter-actions a.btn.filter-btn:hover {
        background-color: #458795;
        color: white;
    }

.delete-btn, .edit-btn, .cad-btn, .details-btn, .back-btn {
    text-decoration: none;
    font-size: 1.2rem;
    color: #f0f0f0 !important;
}

    .delete-btn:visited, .edit-btn:visited, .cad-btn:visited, .details-btn:visited, .back-btn:visited {
        color: #f0f0f0 !important;
    }

.back-btn {
    font-size: 1rem;
    color: #f0f0f0 !important;
}

    .back-btn:visited {
        color: #f0f0f0 !important;
    }

.applied-filters {
    background-color: #252525;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 5px;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #f0f0f0;
    width: max-content;
}

    .applied-filters:empty {
        display: none;
    }

.applied-filter-tag {
    background-color: #16697a;
    color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .applied-filter-tag .remove-filter {
        cursor: pointer;
        font-size: 1rem;
        line-height: 1;
        color: #f0f0f0;
        transition: color 0.2s ease;
    }

        .applied-filter-tag .remove-filter:hover {
            color: #ff4d4d;
        }

.partNumber-col a {
    color: #db6400;
}

html, body {
    overflow-x: hidden;
}
