/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #000000;
    overflow-y: scroll !important;
}

header {
    background-color: #1a1a1a;
    padding: 1rem;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

header:hover {
    opacity: 1;
}

header {
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    width: 1200px;
    /* justify-content: center;
    gap: 1rem; */
    justify-content: space-between;
    align-items: center;
    /* padding: 0.5rem 1rem;     */
}

nav button {
    padding: 0.5rem 1rem;
    background: linear-gradient(145deg, #0d6974, #0e8b99) !important;

    color: #c0bebe;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-button-selected {
    background: linear-gradient(145deg, #fe9c0b, #cc5e00) !important;
    color: #fff;
    font-weight: 400;
    border: none;
    border-radius: 4px;
    cursor: default !important;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px 0px #fe9c0b;
}


nav button:hover {
    color: #FFF;
}

#top-nav {
    display: flex;
    align-items: space-between;
}

#nav-left {
    flex: 1;
    flex-grow: 0;
}

#nav-center {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex: 1;
    flex-grow: 1;
}

#nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    flex-grow: 0;

    gap: 1rem;
}

#menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

#burger-menu {
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem;
    background: linear-gradient(145deg, #0d6974, #0e8b99) !important;
    color: #c0bebe;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

main {
    padding: 2rem;
    padding-top: 5rem;
    display: flex;
    justify-content: center;
}

.main-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

#tablesContainer {
    flex: 1;
    min-width: 0;
    /* Prevents overflow issues */
}

#categoryFilter {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Table Styles */
.item-category {
    margin-bottom: 2rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    opacity: 0.9;
}

.item-category h2 {
    color: #333;
    /* border-bottom: 2px solid #1db6c8; */
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.item-table {
    min-width: 1200px;
    width: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85em;
    margin-top: 1rem;
    border: 5px solid #000;
}

/* First Header Row (Category Headers) */
.item-table thead tr.category-header th {
    color: white;
    font-weight: bold;
    padding: 8px 6px;
    border: none;
    /* Removed default border */
    background-color: #000;
    position: relative;
}


/* Category Header Borders - Match background colors */
.item-table thead tr.category-header th[data-category="SI"],
.item-table thead tr.category-header th[data-category="ECRS"],
.item-table thead tr.category-header th[data-category="EWS"],
.item-table thead tr.category-header th[data-category="Damage"],
.item-table thead tr.category-header th[data-category="Brackets"] {
    background-color: #636466;
    border-right: 1px solid #636466;
    border-left: 1px solid #636466;
}

.item-table thead tr.category-header th[data-category="ABS"],
.item-table thead tr.category-header th[data-category="Stat Enhancement"],
.item-table thead tr.category-header th[data-category="Sensors"],
.item-table thead tr.category-header th[data-category="COMMO"] {
    background-color: #939598;
    border-right: 1px solid #939598;
    border-left: 1px solid #939598;
}

/* Second Header Row - Subcategories */
.item-table thead tr:not(.category-header) th {
    background-color: #000;
    padding: 6px;
    border: none;
    /* Removed default border */
    font-weight: normal;
    color: #1db6c8;
}


/* Subcategory Header Borders - Match background colors */
.item-table thead tr:not(.category-header) th[data-column^="ecrs."],
.item-table thead tr:not(.category-header) th[data-column^="ews."],
.item-table thead tr:not(.category-header) th[data-column^="damage."],
.item-table thead tr:not(.category-header) th[data-column^="brackets."],
.item-table thead tr:not(.category-header) th[data-column^="si."] {
    background-color: #636466;
    border-right: 1px solid #636466;
    border-left: 1px solid #636466;
}

.item-table thead tr:not(.category-header) th[data-column^="sensors."],
.item-table thead tr:not(.category-header) th[data-column^="commo."],
.item-table thead tr:not(.category-header) th[data-column^="stat_enhancement."],
.item-table thead tr:not(.category-header) th[data-column^="abs."] {
    background-color: #939598;
    border-right: 1px solid #939598;
    border-left: 1px solid #939598;
}

/* Model column - special styling */
.item-table thead tr:not(.category-header) th.left {
    color: white !important;
    background-color: #000 !important;
    border-right: 1px solid #000;
    border-left: 1px solid #000;
}

/* Table Body */
.item-table tbody td {
    padding: 6px;
    border: 1px solid #ddd;
    text-align: center;
    line-height: 1.8;
}

.item-table tbody td.left {
    text-align: left;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-row:hover {
    background-color: #fe9c0b;
}



.basic-properties,
.protection-details {
    margin-bottom: 20px;
}

/* Scroll handling */
body.popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body:not(.popup-open) {
    overflow: auto;
    position: static;
}


.tables-container {
    flex: 1;
    overflow-y: auto;
    width: 1200px;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}


.reservedslots-table {
    min-width: 350px;
    margin-bottom: 15px;
    border-collapse: collapse;
    font-size: 0.9em;
}

.reservedslots-table thead th {
    background-color: #1db6c8;
    color: black;
    font-weight: bold;
    padding-left: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
    border: 1px solid #000;
    text-align: left;
}

.reservedslots-table tbody tr td {
    background-color: #ddd;
    padding-left: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
    border: 1px solid #000;
    text-align: left;
}

.reservedslots-table tbody tr td.slotnum {
    text-align: center !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.weapon-category-info-table {
    min-width: 350px;
    border-collapse: collapse;
}

.weapon-category-info-table tbody tr td {
    padding: 12px 12px;
    vertical-align: top;
    border: 1px solid #000;
    text-align: left;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('/assets/images/maddmike.png') center center no-repeat;
    background-size: contain;
    background-color: #000;
    /* black fill for any gaps */
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

/* Container and positioning */
.table-section-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #1db6c8 !important;
    z-index: 10;
}

.table-section-header-text {
    font-size: x-large;
    font-weight: 600;
}

/* Info button styles */
.info-toggle-btn {
    background: linear-gradient(145deg, #fe9c0b, #cc5e00);
    /* Orange with shading */
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    padding: 0.4em 0.8em;
    cursor: pointer;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    position: relative;
}

.info-toggle-btn:hover {
    background: linear-gradient(145deg, #fe9c0b, #dd6e00);
    box-shadow:
        0 3px 7px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#menu-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}

#burger-menu {
    font-size: 24px;
    cursor: pointer;
    padding: 6px 10px;
    background-color: #ff9900;
    color: white;
    border-radius: 4px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

#burger-menu:hover {
    background-color: #e08100;
}

#dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    z-index: 100;
}

#dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #fe9c0b;
}

.dropdown-item:last-child {
    border-bottom: none;
}


.changelog-list {
    list-style: none;
    margin: 0px;
    display: flex;
    flex-direction: column;
    padding: 0px 0px 20px 0px;
}

.changelog-version {
    padding: 0px;
    border: 1px solid #1db6c8;
    margin-top: 30px;
}

.changelog-version-header {
    width: calc(100% - 20px);
    display: inline-flex;
    align-items: center;
    padding-left: 20px;
    height: 40px;
    border-bottom: 1px solid #1db6c8;
    font-size: 1.2em;
}

.changelog-version-description {
    display: inline-block;
    margin-left: 20px;
    margin-top: 15px;
    margin-bottom: 0px;
}

.changelog-entry-list {
    list-style: square;
    border: 0px solid #1db6c8;
    margin-right: 20px;
    margin-bottom: 20px;
    line-height: 1.5rem;
}

.changelog-entry-bullet {
    margin-top: 20px !important;
    margin-left: 20px  !important;
    border: 0px solid #1db6c8;
}