/**
 * Lista mieszkań 2 - Główne style
 */

/* Podstawowe style */
.lm2-wrapper {
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.lm2-wrapper *,
.lm2-wrapper *::before,
.lm2-wrapper *::after {
    box-sizing: inherit;
}

/* Informacje o mieszkaniu */
.lm2-mieszkanie-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lm2-mieszkanie-metraz {
    font-size: 16px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.1);
    color: #fff;
}

/* Nakładka mobilna */
.lm2-mobile-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 1000;
    pointer-events: auto;
}

.lm2-mobile-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.lm2-mobile-overlay-icon {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.lm2-mobile-overlay p {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    margin: 0;
}

.lm2-mobile-overlay-close {
    display: block;
    margin: 15px auto 0;
    padding: 10px 15px;
    background-color: #c2986d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lm2-mobile-overlay-close:hover {
    background-color: #a07b52;
}

/* Tabela */
.lm2-table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.lm2-table th,
.lm2-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.lm2-table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: bold;
}

.lm2-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.lm2-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Status mieszkania */
.lm2-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    text-transform: capitalize;
    font-size: 14px;
    font-weight: normal;
}

.lm2-status-wolne {
    background-color: rgba(0, 128, 0, 0.1);
    color: green;
    font-size: 14px !important;
}

.lm2-status-zarezerwowane {
    background-color: rgba(255, 165, 0, 0.1);
    color: orange;
}

.lm2-status-sprzedane {
    background-color: rgba(255, 0, 0, 0.1);
    color: red;
}

/* Przyciski */
.lm2-btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.lm2-btn-primary {
    color: #fff;
    background-color: #c2986d;
    border-color: #c2986d;
}

.lm2-btn-primary:hover {
    background-color: #cb9f73;
    border-color: #cb9f73;
    transform: translateY(-1px);
}

.lm2-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
}

.lm2-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* DataTables layout */
.lm2-wrapper .dataTables_wrapper {
    margin-bottom: 20px;
}

.lm2-table-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.lm2-table-info,
.lm2-table-pagination,
.lm2-table-length {
    flex: 1;
    margin: 5px;
}

.lm2-table-pagination {
    text-align: center;
}

.lm2-table-length {
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Informacje i długość strony */
.dataTables_info,
.dataTables_length {
    color: #807e7b;
}

.dataTables_length select {
    border-radius: 5px;
    padding: 2px 5px;
    border: 1px solid #dee2e6;
    background-color: #fff;
}

.dataTables_length select:focus {
    border-color: #c2976c;
    outline: none;
}

/* Kolorowanie wierszy */
.lm2-row-reserved {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

.lm2-row-sold {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

/* Responsywność */
@media screen and (max-width: 767px) {
    .lm2-status {
        font-size: 12px;
        padding: 5px;
    }
    
    .lm2-table-bottom {
        flex-direction: column;
    }
    
    .lm2-table-pagination {
        order: 1;
        margin-bottom: 10px;
    }
    
    .lm2-table-info {
        order: 2;
        text-align: center;
    }
    
    .lm2-table-length {
        order: 3;
        justify-content: center;
        margin-top: 10px;
    }
    
    .lm2-mobile-overlay {
        display: flex;
    }
    
    #lm2-mieszkania-table td {
        font-size: 12px;
    }
    
    #lm2-mieszkania-table td:nth-child(8) {
        max-width: 80px;
    }
}

/* Style przejść i transformacji */
.lm2-wrapper .lm2-table thead th,
.lm2-wrapper .lm2-table tbody tr,
.lm2-wrapper .lm2-btn,
.lm2-wrapper .dataTables_paginate .paginate_button,
.lm2-wrapper .dataTables_length select {
    transition: all 0.3s ease;
}