/* Removed full-screen image functionality - now using site.css */

/* Left-justify all table cells */
.data-table th,
.data-table td {
    text-align: left;
}

/* Make table cells respect the width of their header cells */
.data-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

/* Add borders to the table */
.data-table {
    border: 1px solid #ddd;
}

.data-table td,
.data-table th {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Mobile view styles */
@media screen and (max-width: 768px) {

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }

    .data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .data-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        position: relative;
    }

    .data-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding: 8px;
        white-space: normal;
        text-align: left;
    }

    /* Hide empty cells in mobile view */
    .data-table td.empty-cell {
        display: none;
    }

    .data-table td:before {
        display: block;
        margin-bottom: 5px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    /* Label the data for mobile view */
    .data-table td:nth-of-type(2):before {
        content: "Year:";
    }

    .data-table td:nth-of-type(3):before {
        content: "Description:";
    }

    .data-table td:nth-of-type(4):before {
        content: "Category:";
    }

    .data-table td:nth-of-type(5):before {
        content: "Location:";
    }

    .data-table td:nth-of-type(6):before {
        content: "Photo:";
    }

    /* Adjust image size for mobile */
    .equipment-image {
        width: 100%;
        max-width: 300px;
    }

    /* Reposition the status icon to the upper right corner in mobile view */
    .data-table tr {
        padding-right: 40px; /* Make space for the status icon */
    }

    .data-table td:first-child {
        position: absolute;
        top: 5px;
        right: 5px;
        width: auto;
        padding: 0;
        border: none;
        text-align: right;
        z-index: 1;
    }

    .data-table td:first-child:before {
        display: none; /* Hide the label for status */
    }

    .data-table td:first-child .status-icon {
        font-size: 24px;
    }
}

/* Status icons */
.status-icon {
    font-size: 16px;
    opacity: 0.8;
}

.status-operational {
    color: #8bc34a;
    /* Muted Green */
}

.status-non-operational {
    color: #e57373;
    /* Muted Red */
}

.status-under-restoration {
    color: #ffb74d;
    /* Muted Orange */
}

.status-under-construction {
    color: #64b5f6;
    /* Muted Blue */
}

.status-on-display {
    color: #ba68c8;
    /* Muted Purple */
}

/* Sortable table styles */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 18px !important;
}

.sortable:hover {
    background-color: #f5f5f5;
}

.sortable::after {
    content: '↕';
    position: absolute;
    right: 5px;
    color: #999;
}

.sortable.asc::after {
    content: '↑';
    color: #333;
}

.sortable.desc::after {
    content: '↓';
    color: #333;
}

/* Temporarily hide Location column - will be unhidden later */
.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    display: none;
}

/* Filter input styles */
.filter-container {
    margin-bottom: 15px;
    width: 100%;
}

.filter-input {
    width: 300px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    margin: 0 auto;
    display: block;
}

.filter-input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Responsive filter input */
@media screen and (max-width: 768px) {
    .filter-container {
        padding: 0 10px;
    }
}