/* Existing styles remain unchanged, completing mobile styles */

/* Ensure table fills container */
table.wishlist_table.shop_table {
    width: 100%;
    table-layout: auto;
}

/* Style for comparison attribute columns */
.wishlist_table th.product-unit,
.wishlist_table th.product-condition,
.wishlist_table th.product-capacity,
.wishlist_table th.product-make,
.wishlist_table th.product-rating,
.wishlist_table th.product-housing-type,
.wishlist_table th.product-volts,
.wishlist_table th.product-amps,
.wishlist_table th.product-frequency,
.wishlist_table th.product-circuit-breaker-amps,
.wishlist_table th.product-phase,
.wishlist_table th.product-location,
.wishlist_table th.product-leads,
.wishlist_table th.product-model,
.wishlist_table th.product-serial,
.wishlist_table th.product-built,
.wishlist_table th.product-engine-make,
.wishlist_table th.product-hours,
.wishlist_table th.product-fuel-type,
.wishlist_table th.product-fuel-tank-capacity,
.wishlist_table th.product-engine-model,
.wishlist_table th.product-engine-serial,
.wishlist_table th.product-reconnectable,
.wishlist_table th.product-dimensions,
.wishlist_table th.product-weight {
    text-align: center;
    width: auto;
    min-width: 100px;
}

.wishlist_table td.product-unit,
.wishlist_table td.product-condition,
.wishlist_table td.product-capacity,
.wishlist_table td.product-make,
.wishlist_table td.product-rating,
.wishlist_table td.product-housing-type,
.wishlist_table td.product-volts,
.wishlist_table td.product-amps,
.wishlist_table td.product-frequency,
.wishlist_table td.product-circuit-breaker-amps,
.wishlist_table td.product-phase,
.wishlist_table td.product-location,
.wishlist_table td.product-leads,
.wishlist_table td.product-model,
.wishlist_table td.product-serial,
.wishlist_table td.product-built,
.wishlist_table td.product-engine-make,
.wishlist_table td.product-hours,
.wishlist_table td.product-fuel-type,
.wishlist_table td.product-fuel-tank-capacity,
.wishlist_table td.product-engine-model,
.wishlist_table td.product-engine-serial,
.wishlist_table td.product-reconnectable,
.wishlist_table td.product-dimensions,
.wishlist_table td.product-weight {
    text-align: center;
}

/* Column Selector Styles */
.wishlist-column-selector {
    margin-bottom: 20px;
    text-align: right;
}

.column-choose-button {
    background: var(--color-button-style-1-background, #333333);
    color: var(--color-button-style-1-text, #ffffff);
    border: 1px solid var(--color-button-style-1-border, #333333);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.column-choose-button:hover {
    background: var(--color-button-style-1-background-hover, #4f4f4f);
    color: var(--color-button-style-1-text-hover, #ffffff);
    border-color: var(--color-button-style-1-border-hover, #4f4f4f);
}

.column-choose-button i.fa-gear {
    font-size: 1em;
}

.column-choose-content {
    padding: 10px;
    background: #fff;
    border: 1px solid #cdcdcd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.column-choose-content label {
    flex: 0 0 calc(33.33% - 10px);
    margin: 5px 0;
    font-size: 0.9em;
}

.column-choose-content input[type="checkbox"] {
    margin-right: 5px;
}

/* Ensure table columns can be toggled with higher specificity */
.wishlist_table th[data-column],
.wishlist_table td[data-column] {
    display: table-cell;
}

.wishlist_table th[data-column].hidden,
.wishlist_table td[data-column].hidden {
    display: none !important;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .wishlist-column-selector {
        text-align: center;
    }

    .column-choose-button {
        padding: 10px 20px; /* Larger tap target */
        font-size: 1em;
    }

    .column-choose-content {
        flex-direction: column;
        padding: 15px;
        max-height: 300px; /* Adjusted for smaller screens */
    }

    .column-choose-content label {
        flex: 1 1 100%;
        padding: 10px 0; /* Larger tap target */
        font-size: 1em;
        display: flex;
        align-items: center;
    }

    .column-choose-content input[type="checkbox"] {
        margin-right: 10px;
        width: 20px;
        height: 20px; /* Larger checkbox for easier tapping */
    }

    .wishlist_table th[data-column],
    .wishlist_table td[data-column] {
        display: none; /* Hidden in mobile view, shown via item-details-table */
    }

    /* Ensure attribute rows can be toggled */
    .item-details-table tr.attribute-row {
        display: table-row;
    }

    .item-details-table tr.attribute-row.hidden {
        display: none !important;
    }

    /* Improve spacing in item-details-table */
    .item-details-table tr.attribute-row td {
        padding: 8px 5px;
    }

    .item-details-table td.label {
        font-weight: bold;
        width: 40%;
    }

    .item-details-table td.value {
        width: 60%;
    }
}