/**
 * Avantio Properties Map Elementor Widget Styles
 * 
 * @package avantio-properties
 */

/* ========================================
   Widget Container
======================================== */
.lgap-properties-map-wrapper {
    font-family: "Josefin Sans", sans-serif;
    width: 100%;
    position: relative;
}

/* ========================================
   Map Header
======================================== */
.lgap-map-header {
    /* padding: 15px 20px; */
    /* background: #fff; */
    /* border-bottom: 1px solid #e5e5e5; */
    /* margin-bottom: 0; */
}

.lgap-map-stats {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgap-property-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.lgap-property-count i {
    color: #FFB800;
    font-size: 18px;
}

/* ========================================
   Map Container
======================================== */
.lgap-map-container {
    width: 100%;
    /* height: 500px; */
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ========================================
   Map Controls
======================================== */
.lgap-map-controls {
    position: absolute;
    top: 70px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lgap-map-control-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.lgap-map-control-btn:hover {
    background: #FFB800;
    color: #000;
    border-color: #FFB800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lgap-map-control-btn:active {
    transform: translateY(0);
}

/* ========================================
   Map Popup Styles
======================================== */
.lgap-map-popup {
    width: 260px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    font-family: "Josefin Sans", sans-serif;
    border: none;
}

.lgap-popup-header {
    position: relative;
}

.lgap-popup-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.lgap-popup-gallery-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lgap-popup-content {
    padding: 15px;
}

.lgap-popup-title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.lgap-popup-title {
    font-family: "Playfair Display", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.lgap-popup-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lgap-popup-title a:hover {
    color: #FFB800;
}

.lgap-popup-rating-badge {
    background: rgba(255, 184, 0, 0.1);
    border: 1px solid rgba(255, 184, 0, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    flex-shrink: 0;
}

.lgap-popup-rating-badge i {
    color: #FFB800;
    font-size: 11px;
}

.lgap-popup-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.lgap-popup-location i {
    color: #FFB800;
    font-size: 12px;
}

.lgap-popup-type {
    position: relative;
    padding-left: 12px;
}

.lgap-popup-type::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ccc;
}

.lgap-popup-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 15px;
}

.lgap-price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.lgap-popup-price small {
    font-size: 12px;
    color: #666;
}

/* ========================================
   Popup Features
======================================== */
.lgap-popup-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 0px 15px;
    /* background: #f9f9f9; */
    /* margin-left: -15px; */
    /* margin-right: -15px; */
}

.lgap-popup-feature {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #333;
    background: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.lgap-popup-feature i {
    color: #FFB800;
    font-size: 11px;
}

/* ========================================
   Popup Actions
======================================== */
.lgap-popup-actions {
    display: flex;
    gap: 8px;
    padding: 0 15px 15px;
}

.lgap-popup-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 0px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lgap-btn-primary, a.lgap-btn-primary {
    background: #FFB800;
    color: #000;
}

.lgap-btn-primary:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.lgap-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.lgap-btn-secondary:hover {
    background: #e9e9e9;
    color: #000;
    border-color: #ccc;
}

.lgap-popup-btn i {
    font-size: 11px;
}

/* ========================================
   Custom Marker Styles
======================================== */
.lgap-custom-marker {
    background: #FFB800;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lgap-custom-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lgap-custom-marker.active {
    background: #000;
    color: #FFB800;
    transform: scale(1.15);
}

/* ========================================
   Cluster Styles
======================================== */
.lgap-marker-cluster {
    background: rgba(255, 184, 0, 0.2);
    border: 2px solid #FFB800;
    border-radius: 50%;
    color: #000;
    font-weight: 600;
    text-align: center;
    font-size: 12px;
}

.lgap-marker-cluster div {
    background: #FFB800;
    border-radius: 50%;
    color: #000;
    font-weight: 700;
}

/* ========================================
   Empty State
======================================== */
.lgap-map-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    min-height: 400px;
}

.lgap-empty-icon {
    margin-bottom: 20px;
}

.lgap-empty-icon i {
    font-size: 48px;
    color: #ddd;
}

.lgap-map-empty h3 {
    font-family: "Playfair Display", sans-serif;
    font-size: 24px;
    margin: 0 0 10px;
    color: #333;
}

.lgap-map-empty p {
    margin: 0;
    color: #666;
    font-size: 16px;
    max-width: 400px;
}

/* ========================================
   Leaflet Override Styles
======================================== */
.lgap-map-container .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.lgap-map-container .leaflet-popup-content {
    margin: 0;
    line-height: normal;
}

.lgap-map-container .leaflet-popup-tip {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.lgap-map-container .leaflet-popup-close-button {
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    font-size: 18px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    display: none;
}

.lgap-map-container .leaflet-popup-close-button:hover {
    background: #FFB800;
    color: #000;
}

.lgap-map-container .leaflet-div-icon {
    background: none;
    border: none;
}

.lgap-map-container .leaflet-control-zoom {
    display: none; /* Hide default zoom controls since we have custom ones */
}

.lgap-map-container .leaflet-control-attribution {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .lgap-map-controls {
        right: 5px;
    }
    
    .lgap-map-control-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .lgap-map-popup {
        width: 260px;
    }
    
    .lgap-popup-image {
        height: 150px;
    }
    
    .lgap-popup-content {
        padding: 12px;
    }
    
    .lgap-popup-features {
        padding: 0px 12px;
        /* margin-left: -12px; */
        /* margin-right: -12px; */
    }
    
    .lgap-popup-actions {
        padding: 0 12px 12px;
    }
}

@media (max-width: 767px) {
    .lgap-map-header {
        /* padding: 12px 15px; */
    }
    
    .lgap-property-count {
        font-size: 14px;
    }
    
    .lgap-map-controls {
        top: 60px;
    }
    
    .lgap-map-control-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .lgap-map-popup {
        width: 260px;
    }
    
    .lgap-popup-image {
        height: 130px;
    }
    
    .lgap-popup-title {
        font-size: 14px;
    }
    
    .lgap-price-amount {
        font-size: 16px;
    }
    
    .lgap-popup-features {
        gap: 6px;
    }
    
    .lgap-popup-feature {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .lgap-popup-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .lgap-map-empty {
        padding: 60px 15px;
        min-height: 300px;
    }
    
    .lgap-empty-icon i {
        font-size: 36px;
    }
    
    .lgap-map-empty h3 {
        font-size: 20px;
    }
    
    .lgap-map-empty p {
        font-size: 14px;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .lgap-map-controls,
    .lgap-popup-actions {
        display: none;
    }
    
    .lgap-map-container {
        break-inside: avoid;
    }
}

/* ========================================
   High Contrast Mode Support
======================================== */
@media (prefers-contrast: high) {
    .lgap-map-popup {
        border: 2px solid #000;
    }
    
    .lgap-popup-btn {
        border: 2px solid #000;
    }
    
    .lgap-map-control-btn {
        border: 2px solid #000;
    }
}

/* ========================================
   Reduced Motion Support
======================================== */
@media (prefers-reduced-motion: reduce) {
    .lgap-popup-image img,
    .lgap-map-control-btn,
    .lgap-popup-btn,
    .lgap-custom-marker {
        transition: none;
    }
}
