/**
 * Floor Apartments Widget Styles
 */

.euw-floor-apartments-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* ===========================================
   Filter Bar Styles
   =========================================== */

/* Flex Layout (default) */
.euw-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.euw-filter-bar.layout-flex .euw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

/* Grid Layout */
.euw-filter-bar.layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
}

.euw-filter-bar.layout-grid .euw-filters {
    display: contents;
}

.euw-filter-bar.layout-grid .euw-filter-group,
.euw-filter-bar.layout-grid .euw-sort-group {
    width: 100%;
}

.euw-filter-bar.layout-grid .euw-filter,
.euw-filter-bar.layout-grid .euw-sort {
    width: 100%;
}

.euw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

.euw-filter-group,
.euw-sort-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.euw-filter-group label,
.euw-sort-group label {
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.euw-filter,
.euw-sort {
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.euw-filter:hover,
.euw-sort:hover {
    border-color: #999;
}

.euw-filter:focus,
.euw-sort:focus {
    outline: none;
    border-color: #c9485b;
    box-shadow: 0 0 0 2px rgba(201, 72, 91, 0.2);
}

/* Responsive filter bar */
@media (max-width: 768px) {
    .euw-filter-bar,
    .euw-filter-bar.layout-flex,
    .euw-filter-bar.layout-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .euw-filters,
    .euw-filter-bar.layout-flex .euw-filters {
        display: flex;
        flex-direction: column;
    }

    .euw-filter-bar.layout-grid .euw-filters {
        display: flex;
        flex-direction: column;
    }

    .euw-filter-group,
    .euw-sort-group {
        width: 100%;
    }

    .euw-filter,
    .euw-sort {
        width: 100%;
    }
}

/* No results message */
.euw-no-results {
    text-align: center;
    padding: 30px 15px;
    color: #666;
    font-style: italic;
}

/* ===========================================
   Expanding Panel Styles
   =========================================== */

.euw-expanding-wrapper {
    margin-bottom: 20px;
}

.euw-expanding-header {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.euw-expanding-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.euw-expanding-toggle:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.euw-expanding-toggle svg {
    flex-shrink: 0;
}

.euw-expanding-icon {
    color: #666;
}

.euw-expanding-chevron {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.euw-expanding-wrapper.is-expanded .euw-expanding-chevron {
    transform: rotate(180deg);
}

.euw-expanding-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.euw-expanding-content .euw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.euw-expanding-content .euw-filters.layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .euw-expanding-header {
        flex-direction: column;
        align-items: stretch;
    }

    .euw-expanding-toggle {
        width: 100%;
        justify-content: center;
    }

    .euw-expanding-content .euw-filters,
    .euw-expanding-content .euw-filters.layout-grid {
        display: flex;
        flex-direction: column;
    }

    .euw-expanding-content .euw-filter-group {
        width: 100%;
    }

    .euw-expanding-content .euw-filter {
        width: 100%;
    }
}

/* ===========================================
   Off-Canvas Styles
   =========================================== */

.euw-offcanvas-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.euw-offcanvas-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #c9485b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.euw-offcanvas-toggle:hover {
    background-color: #a83a4a;
}

.euw-offcanvas-toggle svg {
    flex-shrink: 0;
}

.euw-inline-sort {
    margin-left: auto;
}

/* Overlay */
.euw-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.euw-offcanvas-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.euw-offcanvas-panel {
    position: fixed;
    top: 0;
    height: 100%;
    width: 320px;
    max-width: 90vw;
    background-color: #fff;
    z-index: 9999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.euw-offcanvas-panel.position-right {
    right: 0;
    transform: translateX(100%);
}

.euw-offcanvas-panel.position-left {
    left: 0;
    transform: translateX(-100%);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.euw-offcanvas-panel.is-active {
    transform: translateX(0);
}

/* Panel Header */
.euw-offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.euw-offcanvas-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.euw-offcanvas-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.euw-offcanvas-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Panel Body */
.euw-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.euw-filters-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.euw-filters-vertical .euw-filter-group {
    width: 100%;
}

.euw-filters-vertical .euw-filter {
    width: 100%;
}

/* Apply/Filter Button */
.euw-offcanvas-apply {
    display: block;
    width: 100%;
    margin-top: 25px;
    padding: 12px 20px;
    background-color: #c9485b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.euw-offcanvas-apply:hover {
    background-color: #a83a4a;
}

/* Body scroll lock when off-canvas is open */
body.euw-offcanvas-open {
    overflow: hidden;
}

/* ===========================================
   Table Styles
   =========================================== */

.euw-floor-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.euw-floor-table thead th {
    text-align: left;
    padding: 15px 12px;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.euw-floor-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.euw-floor-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column widths */
.euw-floor-table .col-apartment {
    min-width: 150px;
}

.euw-floor-table .col-type {
    min-width: 120px;
}

.euw-floor-table .col-location {
    min-width: 100px;
}

.euw-floor-table .col-area {
    min-width: 100px;
}

.euw-floor-table .col-price {
    min-width: 80px;
}

.euw-floor-table .col-status {
    min-width: 100px;
}

.euw-floor-table .col-actions {
    min-width: 250px;
}

/* Apartment column */
.euw-floor-table .col-apartment strong {
    display: block;
    font-size: 1em;
}

.euw-floor-table .col-apartment small {
    color: #666;
    font-size: 0.85em;
}

/* Type column */
.euw-floor-table .col-type strong {
    display: block;
}

.euw-floor-table .col-type small {
    color: #666;
    font-size: 0.85em;
}

/* Location column */
.euw-floor-table .col-location .location-icon {
    color: #666;
    margin-right: 3px;
}

.euw-floor-table .col-location small {
    color: #666;
    font-size: 0.85em;
}

/* Area column */
.euw-floor-table .col-area .area-icon {
    color: #666;
    margin-right: 3px;
}

.euw-floor-table .col-area small {
    color: #666;
    font-size: 0.85em;
}

/* Price blurred placeholder */
.euw-price-blurred {
    display: inline-block;
    color: #999;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Status badge */
.euw-status-badge {
    display: inline-block;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.euw-status-badge.status-available {
    color: #4caf50;
}

.euw-status-badge.status-reserved {
    color: #ff9800;
}

.euw-status-badge.status-sold {
    color: #f44336;
}

.euw-status-badge.status-deposit {
    color: #f0a500;
}

/* Action buttons */
.euw-floor-table .action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.euw-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.euw-btn-inquiry {
    background-color: #c9485b;
    color: #fff;
}

.euw-btn-inquiry:hover {
    background-color: #a83a4a;
    color: #fff;
}

.euw-btn-view {
    background-color: #c9485b;
    color: #fff;
}

.euw-btn-view:hover {
    background-color: #a83a4a;
    color: #fff;
}

.euw-btn .btn-icon {
    font-size: 1.1em;
}

.euw-btn .btn-icon-chevron {
    vertical-align: middle;
    margin-left: 2px;
}

/* Responsive */
@media (max-width: 991px) {
    .euw-floor-table {
        display: block;
    }

    .euw-floor-table thead {
        display: none;
    }

    .euw-floor-table tbody {
        display: block;
    }

    .euw-floor-table tbody tr {
        display: block;
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background-color: #fff;
    }

    .euw-floor-table tbody td {
        display: block;
        padding: 10px 15px;
        border-bottom: none;
        text-align: left;
    }

    .euw-floor-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.8em;
        color: #666;
        margin-bottom: 3px;
        text-transform: uppercase;
    }

    .euw-floor-table .col-actions {
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid #e0e0e0;
    }

    .euw-floor-table .action-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .euw-floor-table .action-buttons {
        flex-direction: column;
    }

    .euw-btn {
        width: 100%;
        justify-content: center;
    }
}
