/**
 * Dealer Map Styles
 */

/* Map Section */
.dealer-map-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dealer-map-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    background: #fff;
    min-height: 500px;
}

/* Location Permission Prompt */
.location-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    text-align: center;
    padding: 40px;
}

.location-prompt-content {
    max-width: 400px;
}

.location-prompt-content .location-icon {
    font-size: 64px;
    color: #4c9173;
    margin-bottom: 24px;
    display: block;
}

.location-prompt-content h4 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 12px;
}

.location-prompt-content p {
    font-size: 16px;
    color: #636e72;
    margin-bottom: 24px;
    line-height: 1.6;
}

.location-prompt-content .btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    border: none;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 145, 115, 0.3);
}

.location-prompt-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 145, 115, 0.4);
    background: linear-gradient(135deg, #3d7a5f 0%, #2d5a47 100%);
}

.location-prompt-content .btn i {
    margin-right: 8px;
}

.location-error .location-icon {
    color: #e74c3c;
}

/* Map Loading */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
}

.map-loading .spinner-border {
    width: 48px;
    height: 48px;
    border-width: 4px;
    color: #4c9173 !important;
}

.map-loading p {
    margin-top: 16px;
    font-size: 16px;
    color: #636e72;
}

/* Leaflet Map */
#dealer-map {
    z-index: 1;
}

/* Custom User Marker */
.custom-user-marker {
    background: transparent;
    border: none;
}

.user-location-pin {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    border: 3px solid #fff;
}

.user-location-pin i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 16px;
}

/* Custom Dealer Marker */
.custom-dealer-marker {
    background: transparent;
    border: none;
}

.dealer-location-pin {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 145, 115, 0.4);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.dealer-location-pin:hover {
    transform: rotate(-45deg) scale(1.1);
}

.dealer-location-pin i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 14px;
}

/* Dealer Popup */
.dealer-custom-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.dealer-custom-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
}

.dealer-custom-popup .leaflet-popup-tip {
    background: #fff;
}

.dealer-popup-card {
    width: 100%;
}

.dealer-popup-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.dealer-popup-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Kompakt Popup Stilleri */
.dealer-popup-compact .dealer-popup-content {
    padding: 12px 14px;
}

.dealer-popup-compact .dealer-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.dealer-popup-compact .corporate-name {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dealer-popup-compact .dealer-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: #fff8e1;
    color: #f57f17;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.dealer-popup-compact .dealer-rating-badge i {
    font-size: 9px;
    color: #ffc107;
}

.dealer-popup-compact .dealer-popup-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dealer-popup-compact .dealer-popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.dealer-popup-compact .dealer-popup-meta span {
    font-size: 11px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 3px;
}

.dealer-popup-compact .dealer-popup-meta i {
    font-size: 11px;
    color: #4c9173;
}

.btn-view-dealer-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    color: #fff !important;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dealer-popup-link:hover .btn-view-dealer-compact {
    background: linear-gradient(135deg, #3d7a5f 0%, #2d5a47 100%);
}

.btn-view-dealer-compact i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.dealer-popup-link:hover .btn-view-dealer-compact i {
    transform: translateX(2px);
}

/* Eski popup stilleri (geriye uyumluluk için) */
.dealer-popup-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
}

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

.dealer-popup-link:hover .dealer-popup-image img {
    transform: scale(1.05);
}

.dealer-popup-content {
    padding: 12px;
}

.dealer-popup-brand {
    margin-bottom: 6px;
}

.dealer-popup-brand .corporate-name {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dealer-popup-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dealer-popup-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.dealer-popup-info span {
    font-size: 11px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 3px;
}

.dealer-popup-info i {
    font-size: 11px;
    color: #4c9173;
}

.dealer-popup-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: #ffeaa7;
    color: #d35400;
    font-size: 12px;
    font-weight: 600;
    border-radius: 5px;
    margin-bottom: 8px;
}

.dealer-popup-rating i {
    color: #f39c12;
}

.dealer-popup-action {
    text-align: center;
}

.btn-view-dealer {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4c9173 0%, #3d7a5f 100%);
    color: #fff !important;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dealer-popup-link:hover .btn-view-dealer {
    background: linear-gradient(135deg, #3d7a5f 0%, #2d5a47 100%);
    transform: translateX(3px);
}

.btn-view-dealer i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dealer-popup-link:hover .btn-view-dealer i {
    transform: translateX(3px);
}

/* User Popup */
.user-popup {
    padding: 8px 12px;
    text-align: center;
}

.user-popup strong {
    color: #3498db;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .dealer-map-section {
        padding: 40px 0;
    }

    .dealer-map-wrapper {
        border-radius: 12px;
        min-height: 400px;
    }

    #dealer-map {
        height: 400px !important;
    }

    .location-prompt {
        min-height: 400px;
        padding: 24px;
    }

    .location-prompt-content .location-icon {
        font-size: 48px;
    }

    .location-prompt-content h4 {
        font-size: 20px;
    }

    .location-prompt-content p {
        font-size: 14px;
    }

    .dealer-popup-image {
        height: 80px;
    }

    .dealer-popup-content {
        padding: 10px;
    }

    .dealer-popup-title {
        font-size: 12px;
    }

    .dealer-popup-compact .dealer-popup-content {
        padding: 10px 12px;
    }

    .dealer-popup-compact .dealer-popup-title {
        font-size: 12px;
    }

    .dealer-popup-compact .dealer-popup-meta span {
        font-size: 10px;
    }

    .btn-view-dealer-compact {
        font-size: 10px;
        padding: 5px 10px;
    }
}

