@charset "UTF-8";

.ui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #222;
    border: 1px solid #eee;
    line-height: 1.4;
}

/* HEADER */
.ui-table thead th {
    text-align: left;
    padding: 5px 10px;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    border-bottom: 1px solid dimgray;
    background: transparent;
}

/* HEADER HOVER (sortable) */
.ui-table thead th[style*="cursor: pointer"]:hover {
    background: #eeddd8;
}

/* CELLE */
.ui-table tbody td {
    padding: 3px 10px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
    cursor: default;
}

/* ZEBRA */
.ui-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ui-table tbody tr:nth-child(odd) {
    background: #f5f5f5;
}

/* HOVER ROW */
.ui-table tbody tr:hover {
    background: #f6ebe7;
}

/* LOADING ROW */
.ui-table tbody tr.loading td {
    color: #999;
    text-align: center;
    padding: 20px;
}

/* =========================
   ALIGN (FIXED APPROACH)
   ========================= */

/* center */
.ui-table th[style*="text-align: center"],
.ui-table td[style*="text-align: center"] {
    text-align: center;
}

/* right */
.ui-table th[style*="text-align: right"],
.ui-table td[style*="text-align: right"] {
    text-align: right;
}

/* left (opzionale ma coerente) */
.ui-table th[style*="text-align: left"],
.ui-table td[style*="text-align: left"] {
    text-align: left;
}

/* LINKS */
.ui-table a.link {
    color: var(--color-link, #333);
    text-decoration: none;
}

.ui-table a.link:hover {
    color: var(--color-link-hover, #884400);
    text-decoration: underline;
}

.table-pager {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.table-pager button {
    padding: 2px 6px;
    border: 1px solid dimgray;
    background: transparent;
    cursor: pointer;
    border-radius: 3px;
    min-width: 2em;
    height: 2em;
    width: auto;
    margin: 0px 3px;
}

.table-pager button:hover {
    background: #d6bcb1;
}

.table-pager .active {
    font-weight: bold;
    background: transparent;
    padding: 2px 7px;
}

.ui-table th .sort {
    font-size: 0.7rem;
    margin-left: 4px;
    color: #666;
}

.ui-table tbody {
    transition: opacity 120ms ease;
}

.ui-table tbody.is-loading {
    opacity: 0.4;
}

.table-search {
    margin-bottom: 6px;
    padding: 4px 8px;
    width: 200px;
    border: 1px solid #ccc;
    font-size: 0.85rem;
    margin-right: 1em;
}

.ui-table mark {
    background: #ffe58a;
    padding: 0 2px;
}

.table-search-wrapper {
    display: flex;
    justify-content: flex-end;
}

.table-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.table-search-icon {
    position: absolute;
    left: 8px;
    top: 45%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    font-size: 125%;
}

.table-search {
    width: 15em;
    padding: 5px 28px;
    padding-left: 34px;
    border: 1px solid dimgray;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    background: #f5f5f5;
}


.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.table-title {
    font-weight: 600;
    font-size: 1rem;
    margin-left: 1em;
}

.table-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 6px;
}

.table-footer-info {
    font-size: 0.8rem;
    color: #666;
}