/* Index Page Specific Styles */

/* Mobile Guest Option Override */
@media screen and (max-width: 768px) {
    .guest-option {
        display: inline !important;
        padding: 0 !important;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    animation: slideIn 0.3s ease;
}

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

/* Map Popup Styles from Listing Page */
.property-popup-card {
    width: 280px;
    min-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.property-popup-card .popup-header {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.property-popup-card .popup-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-popup-card .popup-header:hover img {
    transform: scale(1.01);
}

.property-popup-card .popup-price {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.property-popup-card .popup-content {
    padding: 16px;
}

.property-popup-card .popup-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.property-popup-card .popup-stars {
    display: flex;
    margin-right: 8px;
}

.property-popup-card .popup-stars .star {
    color: #ffd700;
    font-size: 14px;
    margin-right: 1px;
}

.property-popup-card .popup-stars .star.empty {
    color: #ddd;
}

.property-popup-card .popup-rating-details {
    font-size: 12px;
    color: #666;
}

.property-popup-card .popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-popup-card .popup-location {
    display: flex;
    align-items: center;
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 12px;
}

.property-popup-card .popup-location i {
    margin-right: 6px;
    color: #d99058;
}

.property-popup-card .popup-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.property-popup-card .popup-btn-view {
    width: 100%;
    padding: 10px 16px;
    background: #553513;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.property-popup-card .popup-btn-view:hover {
    background: #553513;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 90, 95, 0.3);
}

.custom-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.custom-leaflet-popup .leaflet-popup-tip {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-leaflet-popup .leaflet-popup-close-button {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 28px;
    color: #333;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-weight: normal;
    padding: 0;
}

.custom-leaflet-popup .leaflet-popup-close-button:hover {
    background: #f5f5f5;
    color: #000;
}

.leaflet-popup-content {
    margin: 0px !important;
    padding: 0 !important;
}

/* Mobile-specific map popup improvements */
@media (max-width: 768px) {
    .property-popup-card {
        width: 100% !important;
        min-height: 280px !important;
        max-height: 400px !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        overflow: visible !important;
    }

    .property-popup-card .popup-header {
        height: 120px !important;
    }

    .property-popup-card .popup-content {
        padding: 12px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .property-popup-card .popup-title {
        font-size: 14px !important;
        line-height: 1.2 !important;
        margin: 6px 0 !important;
    }

    .property-popup-card .popup-location {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }

    .property-popup-card .popup-rating {
        margin-bottom: 8px !important;
    }

    .property-popup-card .popup-btn-view {
        padding: 8px 12px !important;
        font-size: 14px !important;
        margin-top: 8px !important;
    }

    .custom-leaflet-popup {
        z-index: 99999 !important;
    }

    /* Force popup to appear at top on mobile */
    .leaflet-popup-pane .custom-leaflet-popup {
        position: fixed !important;
        top: 20px !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        z-index: 99999 !important;
        width: calc(100vw - 20px) !important;
        max-width: 350px !important;
        margin: 0 auto !important;
    }

    /* Hide popup tip/arrow on mobile since popup is at top */
    .custom-leaflet-popup .leaflet-popup-tip-container {
        display: none !important;
    }

    .custom-leaflet-popup .leaflet-popup-tip {
        display: none !important;
    }

    .custom-leaflet-popup .leaflet-popup-content-wrapper {
        border-radius: 16px;
        pointer-events: auto !important;
        margin: 0 !important;
        width: 100% !important;
        max-height: 480px !important;
        overflow: visible !important;
        padding: 10px;
    }

    .custom-leaflet-popup .leaflet-popup-content {
        pointer-events: auto !important;
        user-select: text !important;
        margin: 0 !important;
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .custom-leaflet-popup .leaflet-popup-close-button {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 22px;
        background: none;
        border-radius: 50%;
        pointer-events: auto !important;
        z-index: 10000;
        box-shadow: none;
    }

    .property-popup-card {
        pointer-events: auto !important;
    }

    .property-popup-card .popup-btn-view {
        padding: 12px 16px;
        font-size: 16px;
        font-weight: 600;
        pointer-events: auto !important;
        touch-action: manipulation;
    }

    /* Prevent map interactions when popup is open */
    .leaflet-popup-pane {
        pointer-events: auto !important;
    }
}