/* Investment Properties Table Styles */

.investment-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.investment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.investment-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.investment-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1A202C;
    white-space: nowrap;
    user-select: none;
}

.investment-table th.sortable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.investment-table th.sortable:hover {
    background: #e9ecef;
}

.investment-table th .sort-icon {
    margin-left: 5px;
    opacity: 0.4;
    font-size: 10px;
}

.investment-table th.sorted-asc .sort-icon,
.investment-table th.sorted-desc .sort-icon {
    opacity: 1;
}

.investment-table th.sorted-asc .sort-icon::after {
    content: '↑';
}

.investment-table th.sorted-desc .sort-icon::after {
    content: '↓';
}

.investment-table th.sorted-asc .sort-icon,
.investment-table th.sorted-desc .sort-icon {
    font-size: 12px;
}

.investment-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.15s ease;
}

.investment-table tbody tr:hover {
    background-color: #f8f9fa;
}

.investment-table tbody tr.status-sprzedane {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.investment-table td {
    padding: 15px 12px;
    vertical-align: middle;
    color: #1A202C;
}

/* Cena */
.investment-table .cena-cell {
    white-space: nowrap;
}

.investment-table .cena-stara {
    display: block;
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.investment-table .cena-aktualna {
    display: block;
    color: #494441;
    font-weight: 600;
    font-size: 15px;
}

/* Status */
.investment-table .status-cell {
    font-weight: 600;
}

.investment-table .status-cell.status-dostepne {
    color: #28a745;
}

.investment-table .status-cell.status-rezerwacja {
    color: #d4a017;
}

.investment-table .status-cell.status-sprzedane {
    color: #dc3545;
}

/* Przyciski akcji */
.investment-table .action-cell {
    text-align: center;
    white-space: nowrap;
}

.investment-table .btn-zapytaj,
.investment-table .btn-zobacz {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.investment-table .btn-zapytaj {
    background: #1A202C;
    color: #fff;
}

.investment-table .btn-zapytaj:hover {
    background: #2d3748;
    color: #fff;
}

.investment-table .btn-zobacz {
    background: #fff;
    color: #1A202C;
    border: 1px solid #1A202C;
}

.investment-table .btn-zobacz:hover {
    background: #1A202C;
    color: #fff;
}

/* Metraż superscript */
.investment-table td sup {
    font-size: 10px;
}

/* Responsywność */
@media (max-width: 992px) {
    .investment-table {
        font-size: 13px;
    }
    
    .investment-table th,
    .investment-table td {
        padding: 10px 8px;
    }
    
    .investment-table .btn-zapytaj,
    .investment-table .btn-zobacz {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .investment-table-wrapper {
        margin: 10px -15px;
        padding: 0 15px;
    }
    
    .investment-table {
        font-size: 12px;
        min-width: 700px;
    }
    
    .investment-table th {
        font-size: 11px;
    }
}

/* Animacja sortowania */
.investment-table tbody tr {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pusta tabela */
.investment-table tbody:empty::after {
    content: 'Brak dostępnych lokali';
    display: block;
    padding: 40px;
    text-align: center;
    color: #999;
}