/* تحسينات خريطة جوجل المحسنة */

/* حاوية الخريطة */
#map {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    background-color: white;
}


@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(211, 171, 85, 0.5);
    }

    to {
        box-shadow: 0 0 15px rgba(211, 171, 85, 0.8);
    }
}

/* زر الموقع الحالي */
.current-location-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-location-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(66, 133, 244, 0.5);
    background: linear-gradient(135deg, #3367d6, #2e7d32);
}

.current-location-btn:active {
    transform: scale(0.95);
}

/* أنيميشن التحميل للموقع */
.current-location-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* تحسين للأجهزة المحمولة */
@media (max-width: 768px) {
    #map {
        height: 400px !important;
        border-radius: 12px;
        margin: 20px 0;
    }

    .map {
        margin: 2rem 0;
        padding: 25px !important;
        border-radius: 16px;
    }

    .map h1 {
        font-size: 24px !important;
        text-align: center !important;
        margin-bottom: 2rem;
    }

    .map h1::after {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 80px;
    }

    .current-location-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #map {
        height: 350px !important;
        border-radius: 10px;
    }

    .map {
        padding: 20px !important;
    }

    .current-location-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* تحسين شعار جوجل */
.gm-style .gm-style-cc {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.gm-style .gm-style-cc:hover {
    opacity: 1;
}

/* تحسين عناصر التحكم الأخرى */
.gm-style .gm-svpc {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(5px) !important;
}

/* تأثيرات إضافية للماركرز */
.custom-marker {
    animation: markerDrop 0.6s ease-out;
}

@keyframes markerDrop {
    0% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }

    50% {
        transform: translateY(10px) scale(1.1);
        opacity: 0.8;
    }

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

/* تحسين نوافذ المعلومات المخصصة */
.custom-info-window {
    direction: rtl;
    font-family: 'Arial', sans-serif;
    max-width: 300px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.custom-info-window h4 {
    color: #d3ab55;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 2px solid rgba(211, 171, 85, 0.3);
    padding-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.custom-info-window p {
    margin: 10px 0;
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

.custom-info-window .info-label {
    font-weight: bold;
    color: #333;
    display: inline-block;
    min-width: 60px;
}

/* رسالة الموقع */
.location-message {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
    max-width: 250px;
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(211, 171, 85, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.location-message.success {
    border-left: 4px solid #4caf50;
}

.location-message.error {
    border-left: 4px solid #f44336;
}

.location-message.info {
    border-left: 4px solid #2196f3;
}