/**
 * Property24 Scraper Frontend Styles
 * 
 * Frontend styles for Logic Realty property listings
 */

/* Main property listings container */
.property24-listings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

/* Individual property listing */
.property24-listing {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.property24-listing:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Property image */
.property24-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.property24-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property24-listing:hover .property24-image {
    transform: scale(1.05);
}

.property24-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.7));
    pointer-events: none;
}

/* Property content */
.property24-content {
    padding: 20px;
}

.property24-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.property24-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.property24-title a:hover {
    color: #0073aa;
}

.property24-price {
    font-size: 24px;
    font-weight: 700;
    color: #2c5f41;
    margin: 0 0 15px 0;
}

.property24-location {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
}

.property24-location::before {
    content: "📍";
    margin-right: 5px;
}

.property24-details {
    font-size: 14px;
    color: #555;
    margin: 0 0 15px 0;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.property24-details-item {
    display: inline-block;
    margin-right: 15px;
    font-weight: 500;
}

.property24-details-item::after {
    content: "•";
    margin-left: 15px;
    color: #ccc;
}

.property24-details-item:last-child::after {
    display: none;
}

/* Agent information */
.property24-agent {
    font-size: 13px;
    color: #777;
    margin: 10px 0 0 0;
    padding: 10px 0 0 0;
    border-top: 1px solid #f0f0f0;
}

.property24-agent-label {
    font-weight: 500;
}

/* Logic Realty branding */
.logic-realty-contact {
    background: #f8f9fa;
    border-top: 2px solid #0073aa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 0 8px 8px;
}

.logic-realty-logo {
    font-weight: 700;
    color: #0073aa;
    font-size: 16px;
    margin-bottom: 10px;
}

.logic-realty-info {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.logic-realty-info a {
    color: #0073aa;
    text-decoration: none;
}

.logic-realty-info a:hover {
    text-decoration: underline;
}

/* Call to action buttons */
.property24-cta {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.property24-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property24-btn-primary {
    background: #0073aa;
    color: #fff;
}

.property24-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.property24-btn-secondary {
    background: #fff;
    color: #0073aa;
    border: 1px solid #0073aa;
}

.property24-btn-secondary:hover {
    background: #0073aa;
    color: #fff;
}

/* No listings message */
.property24-no-listings {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Loading states */
.property24-loading-container {
    text-align: center;
    padding: 40px 20px;
}

.property24-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: property24-spin 1s linear infinite;
}

@keyframes property24-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.property24-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.property24-pagination button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property24-pagination button:hover:not(:disabled) {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.property24-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.property24-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Filters */
.property24-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.property24-filters-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

.property24-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.property24-filter-group {
    display: flex;
    flex-direction: column;
}

.property24-filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.property24-filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.property24-filter-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.property24-filters-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .property24-listings {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .property24-image-container {
        height: 200px;
    }
    
    .property24-content {
        padding: 15px;
    }
    
    .property24-title {
        font-size: 16px;
    }
    
    .property24-price {
        font-size: 20px;
    }
    
    .property24-cta {
        flex-direction: column;
    }
    
    .property24-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .property24-filters-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .property24-content {
        padding: 12px;
    }
    
    .property24-title {
        font-size: 15px;
    }
    
    .property24-price {
        font-size: 18px;
    }
    
    .property24-details {
        font-size: 13px;
    }
    
    .property24-details-item {
        display: block;
        margin: 5px 0;
    }
    
    .property24-details-item::after {
        display: none;
    }
}

/* Print styles */
@media print {
    .property24-listings {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .property24-listing {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .property24-cta,
    .property24-pagination,
    .property24-filters {
        display: none;
    }
}

/* Accessibility improvements */
.property24-listing:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.property24-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Screen reader only text */
.property24-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .property24-listing {
        border: 2px solid #000;
    }
    
    .property24-btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .property24-btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .property24-listing,
    .property24-image,
    .property24-btn {
        transition: none;
    }
    
    .property24-spinner {
        animation: none;
        border: 4px solid #666;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .property24-listing {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .property24-title {
        color: #e2e8f0;
    }
    
    .property24-title a {
        color: #90cdf4;
    }
    
    .property24-price {
        color: #68d391;
    }
    
    .property24-location,
    .property24-details,
    .property24-agent {
        color: #a0aec0;
    }
    
    .logic-realty-contact {
        background: #1a202c;
        border-top-color: #63b3ed;
    }
    
    .property24-filters {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .property24-filter-input {
        background: #1a202c;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}