/**
 * Property Resales Online - Frontend Styles
 */

/* Container */
.property-resales-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
.property-resales-header {
    margin-bottom: 30px;
    text-align: center;
}

.property-resales-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

.property-resales-subheading {
    font-size: 1rem;
    color: #666;
}

/* Filter Form */
.property-resales-filters {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Search bar */

.property-resales-search-form {
    margin-bottom: 20px;
}

.property-resales-search-input-container {
    display: flex;
    width: 100%;
    gap: 10px;
}

.property-resales-search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.property-resales-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.property-resales-search-button {
    padding: 0 20px;
    background-color: var(--property-button-color);
    color: var(--property-button-text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.property-resales-search-button:hover {
    background-color: var(--property-primary-color);
}

/* Advanced Filters Toggle */
.property-resales-advanced-toggle {
    display: block;
    width: 100%;
    background-color: var(--property-button-color);
    color: var(--property-button-text-color);
    border: none;
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    text-align: center;
    transition: background-color 0.2s;
    position: relative;
}

.property-resales-advanced-toggle:hover {
    background-color: var(--property-primary-color);
}

.property-resales-advanced-toggle::after {
    content: '▾';
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.2s;
}

.property-resales-advanced-toggle.open::after {
    transform: rotate(180deg);
}

.property-resales-advanced-filters {
    display: none;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.property-resales-advanced-filters.open {
    display: block;
}

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

.property-resales-filter-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.property-resales-filter-col {
    flex: 1;
    min-width: 200px;
    padding: 0 10px;
    margin-bottom: 15px;
}

.property-resales-filter-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.property-resales-filter-input,
.property-resales-filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.property-resales-filter-input:focus,
.property-resales-filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.property-resales-filter-input[type="number"] {
    -moz-appearance: textfield;
}

.property-resales-filter-input[type="number"]::-webkit-outer-spin-button,
.property-resales-filter-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Multi-select dropdowns */
.property-resales-multiselect {
    position: relative;
    width: 100%;
}

.property-resales-multiselect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    min-height: 38px;
}

.property-resales-multiselect-header.active {
    border-color: #0073aa;
}

.property-resales-multiselect-placeholder {
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-resales-multiselect-selection {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.property-resales-multiselect-arrow {
    transition: transform 0.2s;
}

.property-resales-multiselect-arrow.open {
    transform: rotate(180deg);
}

.property-resales-multiselect-dropdown {
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.property-resales-multiselect-search {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.property-resales-multiselect-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.property-resales-multiselect-options {
    padding: 5px 0;
}

.property-resales-multiselect-option {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
}

.property-resales-multiselect-option:hover {
    background-color: #f8f9fa;
}

.property-resales-multiselect-option input {
    margin-right: 8px;
}

.property-resales-multiselect-category {
    font-weight: 600;
    color: #0073aa;
    padding: 6px 12px;
    margin-top: 5px;
    border-top: 1px solid #eee;
}

.property-resales-multiselect-group {
    padding-left: 10px;
}

.property-resales-multiselect-empty {
    padding: 10px;
    text-align: center;
    color: #6c757d;
}

.property-resales-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.property-resales-selected-item {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.property-resales-selected-item-remove {
    margin-left: 5px;
    cursor: pointer;
    color: #999;
}

.property-resales-selected-item-remove:hover {
    color: #f56565;
}

.property-resales-filter-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.property-resales-filter-button {
    /* Hide the Apply Filters button */
    display: none;
}

.property-resales-filter-button.reset {
    /* Show only the Reset Filters button */
    display: inline-block;
    background-color: var(--property-button-color, #3498db);
    color: var(--property-button-text-color, white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0 5px;
    transition: background-color 0.2s;
}

.property-resales-filter-button.reset:hover {
    background-color: var(--property-button-hover-color, #2980b9);
}

/* Property Grid */
.property-resales-grid {
    display: grid;
    margin-bottom: 30px;
}

/* Grid layout */
.property-resales-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* List layout */
.property-resales-grid.list-view {
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Carousel layout */
.property-resales-grid.carousel-view {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.property-resales-grid.carousel-view::-webkit-scrollbar {
    height: 8px;
}

.property-resales-grid.carousel-view::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.property-resales-grid.carousel-view::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.property-resales-grid.carousel-view .property-card {
    flex: 0 0 320px;
}

/* Loading and Error Messages */
.property-resales-loading,
.property-resales-error {
    text-align: center;
    padding: 50px 0;
    grid-column: 1 / -1;
}

.property-resales-loading::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: property-resales-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes property-resales-spin {
    to { transform: rotate(360deg); }
}

.property-resales-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 20px;
}

/* Results Info and Pagination */
.property-resales-results-info {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.property-resales-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.property-resales-pagination-button {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.property-resales-pagination-button:hover {
    background-color: #e9ecef;
}

.property-resales-pagination-button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.property-resales-pagination-button:disabled {
    background-color: #f8f9fa;
    color: #aaa;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .property-resales-filter-row {
        flex-direction: column;
    }
    
    .property-resales-filter-col {
        width: 100%;
    }
    
    .property-resales-grid {
        grid-template-columns: 1fr;
    }
    
    .property-resales-pagination {
        flex-wrap: wrap;
    }
}

/* Featured Carousel Styles */
.property-resales-featured-carousel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

.featured-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.featured-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.featured-carousel-info {
    flex: 2;
    min-width: 300px;
}

.featured-carousel-title {
    font-size: 1.4rem;
    margin: 0 0 5px;
    font-weight: 600;
}

.featured-carousel-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--property-primary-color);
    margin: 0 0 5px;
}

.featured-carousel-location {
    font-size: 0.9rem;
    margin: 0 0 5px;
    opacity: 0.9;
}

.featured-carousel-features {
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.featured-carousel-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 0.9rem;
}

.featured-carousel-feature i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.featured-carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.featured-carousel-arrow {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s ease;
}

.featured-carousel-arrow:hover {
    background-color: var(--property-primary-color);
}

.featured-carousel-dots {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
}

.featured-carousel-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-carousel-dot.active {
    background-color: var(--property-primary-color);
    transform: scale(1.2);
}

.featured-carousel-view-button {
    background-color: var(--property-button-color);
    color: var(--property-button-text-color);
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.featured-carousel-view-button:hover {
    background-color: var(--property-primary-color);
}

@media (max-width: 768px) {
    .featured-carousel-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .featured-carousel-features {
        justify-content: flex-start;
        margin-top: 10px;
    }
}

/* Component styles are now included directly */
