body {
    font-family: sans-serif;
}

p {
    max-width: 35rem;
}

#drop-zone {
    border: 2px dashed gray;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 20px;
}

#drop-zone p {
    max-width: none;
    margin: 0;
}

.hidden {
    display: none !important;
}

/* Wildcards */
#wildcards {
    border: 1px solid gray;
    padding: 15px;
    margin-bottom: 20px;
}

#row-count {
    font-size: 0.8rem;
    font-weight: normal;
    color: gray;
    margin-left: 8px;
}

#wildcard-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item label {
    font-size: 0.8rem;
    font-weight: bold;
}

/* Table */
.table-scroll {
    overflow-x: auto;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid gray;
    padding: 5px;
    background: white;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
}

.checkbox-item input {
    margin: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid gray;
    padding: 8px;
    text-align: left;
}

th {
    background-color: transparent;
    white-space: nowrap;
}

td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Custom Tooltip */
.header-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.info-icon {
    position: relative;
    font-size: 0.9em;
    cursor: help;
}

.tooltip-box {
    visibility: hidden;
    width: 220px;
    background-color: white;
    color: black;
    border: 1px solid black;
    padding: 10px;
    position: absolute;
    z-index: 100;
    top: 125%;
    /* Position below the header to avoid clipping */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: normal;
    text-transform: none;
    white-space: normal;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.info-icon:hover .tooltip-box {
    visibility: visible;
}

.tooltip-box.left-align {
    left: 0;
    transform: none;
}

/* Sorting */
th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: #f9f9f9;
}

.sort-icon {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-left: 4px;
}

th.sortable:hover .sort-icon {
    opacity: 1;
}
