/* Rent Page Specific Styles */

/* Map and Listings Section */
.map-listings-section {
    display: flex;
    height: 70vh;
    min-height: 600px;
    background: #f8f9fa;
}

.map-container {
    flex: 1;
    position: relative;
    background: #e9ecef;
}

.map-header {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-control-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-control-btn:hover {
    background: #f8f9fa;
    border-color: #0066cc;
}

.map-control-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.map-zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.zoom-btn {
    background: white;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #333;
}

.zoom-btn:hover {
    background: #f8f9fa;
    border-color: #0066cc;
}

.map {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
}

.map-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    z-index: 1000;
    pointer-events: none;
}

.map-tooltip p {
    margin: 0;
}

.listings-sidebar {
    width: 400px;
    background: white;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.listings-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.listings-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.listings-count {
    color: #666;
    font-size: 0.875rem;
}

.listings-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Rent Hero Section */
.rent-hero {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.rent-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.rent-hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.rent-search-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

.rent-search-container .search-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

/* Quick Filters */
.quick-filters {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: #e9ecef;
    color: #333;
}

.filter-tab.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}

/* Rental Properties Section */
.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.properties-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Rental Cards */
.rental-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.rental-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.rental-card .property-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.rental-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rental-card:hover .property-image img {
    transform: scale(1.05);
}

.rent-badge {
    background: #28a745 !important;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.availability {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.rental-card .property-details {
    padding: 1.5rem;
}

.rent-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 0.75rem;
}

.rent-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.rental-card .property-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.875rem;
}

.rental-card .property-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rental-card .property-address {
    color: #333;
    font-weight: 500;
    margin-bottom: 1rem;
}

.rental-card .property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rental-card .feature {
    background: #f0f8ff;
    color: #0066cc;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.rental-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.875rem;
    color: #666;
}

.deposit {
    font-weight: 500;
    color: #333;
}

.utilities {
    font-style: italic;
}

/* Rental Tips Section */
.rental-tips {
    padding: 4rem 0;
    background: white;
}

.rental-tips h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.tip-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tip-icon i {
    font-size: 1.75rem;
    color: white;
}

.tip-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.875rem;
}

.rental-card.hidden {
    display: none;
}

.rental-card.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-tab.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.filter-tab.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rental-card[data-type="apartments"] .rent-badge { background: #17a2b8 !important; }
.rental-card[data-type="houses"] .rent-badge { background: #28a745 !important; }
.rental-card[data-type="condos"] .rent-badge { background: #6f42c1 !important; }

@media (max-width: 1024px) {
    .listings-sidebar { width: 350px; }
}

@media (max-width: 768px) {
    .map-listings-section { flex-direction: column; height: auto; min-height: auto; }
    .map-container { height: 50vh; min-height: 300px; }
    .listings-sidebar { width: 100%; height: 50vh; min-height: 300px; }
    .rent-hero h1 { font-size: 2rem; }
    .rent-hero p { font-size: 1rem; }
    .rent-search-container .search-form { grid-template-columns: 1fr; }
    .filter-tabs { justify-content: flex-start; overflow-x: auto; padding-bottom: 0.5rem; }
    .filter-tab { white-space: nowrap; flex-shrink: 0; }
    .properties-header { flex-direction: column; align-items: flex-start; }
    .properties-header h2 { font-size: 1.75rem; }
    .rental-tips h2 { font-size: 2rem; }
    .tips-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .map-container { height: 40vh; min-height: 250px; }
    .listings-sidebar { height: 60vh; min-height: 400px; }
    .rent-hero { padding: 2rem 0; }
    .rental-card .property-details { padding: 1rem; }
    .rent-price { font-size: 1.5rem; }
    .rental-card .property-info { flex-direction: column; gap: 0.5rem; }
    .rental-details { font-size: 0.75rem; }
    .map-header { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .map-zoom-controls { flex-direction: row; }
}
