/* Dealer Map Widget Styles */

.dealer-map-container {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-bottom: 30px;
    position: relative;
}

/* Sol Panel - Filtre Formu */
.dealer-filter-panel {
    flex: 0 0 350px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.dealer-filter-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dealer-filter-form:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.filter-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
}

.filter-label i {
    color: #3498db;
    font-size: 16px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    background-color: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.filter-select:hover:not(:disabled) {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ecf0f1;
}

.filter-reset-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 25px;
}

.filter-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.filter-reset-btn:active {
    transform: translateY(0);
}

.results-count {
    margin-top: 20px;
    padding: 12px;
    background: #ecf0f1;
    border-radius: 8px;
    text-align: center;
}

.results-count span {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Sağ Panel - Harita */
.dealer-map-panel {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.map-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-content {
    position: relative;
    display: inline-block;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

.turkey-map-image {
    width: 100%;
    height: auto;
    display: block;
}

.map-markers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Map Legend */
.map-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
}

.legend-item:hover {
    transform: translateY(-2px);
    background: rgba(52, 152, 219, 0.1);
}

.legend-item.legend-active {
    background: rgba(52, 152, 219, 0.2);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: legendPulse 2s infinite;
}

@keyframes legendPulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(52, 152, 219, 0.2);
    }
}

.legend-label {
    user-select: none;
}

/* Harita Markerleri */
.map-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: markerAppear 0.5s ease forwards;
    opacity: 0;
}

@keyframes markerAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    60% {
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.map-marker::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.map-marker i {
    color: #ffffff;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.map-marker.active {
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 20;
    animation: markerBounce 0.6s ease;
}

.map-marker.active::before {
    animation: none;
    /* Active olduğunda pulse animasyonunu durdur */
}

@keyframes markerBounce {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1.4);
    }

    50% {
        transform: translate(-50%, -60%) scale(1.4);
    }
}

/* Marker Tooltip */
.marker-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.95);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
    font-weight: 600;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(44, 62, 80, 0.95);
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 130%;
}

/* Bayi Detay Kartı */
.dealer-detail-card {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    position: relative;
}

.dealer-detail-card.active {
    max-height: 800px;
    opacity: 1;
    padding: 40px;
    margin-top: 30px;
}

.detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #95a5a6;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.detail-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
    transform: rotate(90deg);
}

.detail-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    animation: detailFadeIn 0.5s ease;
}

@keyframes detailFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.detail-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.dealer-type-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.dealer-type-badge.supplier {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.dealer-type-badge.trainer {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.dealer-type-badge.service {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item i {
    color: #3498db;
    font-size: 18px;
    margin-top: 2px;
}

.info-item-content strong {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item-content span,
.info-item-content a {
    display: block;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.6;
}

.info-item-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.detail-description {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
}

.detail-description h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.detail-description p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* Zoom Animasyonu */
.map-content.zoom-in {
    transform: scale(1.8);
}

.map-content.zoom-to-location {
    transform: scale(2.5);
}

/* Responsive */
@media (max-width: 1200px) {
    .dealer-filter-panel {
        flex: 0 0 300px;
    }

    .map-legend {
        gap: 20px;
        padding: 15px;
    }

    .legend-item {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .dealer-map-container {
        flex-direction: column;
    }

    .dealer-filter-panel {
        flex: 1;
        position: relative;
        top: 0;
    }

    .dealer-filter-form {
        max-width: 600px;
        margin: 0 auto;
    }

    .dealer-map-panel {
        min-height: 500px;
    }

    .detail-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .dealer-filter-form {
        padding: 25px;
    }

    .filter-title {
        font-size: 22px;
    }

    .map-marker {
        width: 25px;
        height: 25px;
    }

    .map-marker i {
        font-size: 12px;
    }

    .dealer-detail-card.active {
        padding: 25px;
    }

    .detail-info h2 {
        font-size: 24px;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .map-legend {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .legend-item {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dealer-filter-form {
        padding: 20px;
    }

    .dealer-map-panel {
        min-height: 400px;
    }

    .map-marker {
        width: 22px;
        height: 22px;
    }

    .map-legend {
        gap: 10px;
        padding: 12px;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }
}

/* Loading State */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #7f8c8d;
    display: none;
}

.map-loading.active {
    display: block;
}

.map-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ecf0f1;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results Message */
.no-results-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: none;
}

.no-results-message.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.no-results-message i {
    font-size: 48px;
    color: #95a5a6;
    margin-bottom: 15px;
}

.no-results-message p {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

/* Marker Filter Animation */
.map-marker.filtered-out {
    animation: markerDisappear 0.3s ease forwards;
}

@keyframes markerDisappear {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}