/**
 * أنماط الخرائط والإشعارات
 * Maps & Notifications Styles
 */

/* ========================================
   Map Container
   ======================================== */

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: #1e293b;
}

.map-container.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    height: 100vh;
    border-radius: 0;
}

/* Map Placeholder */
.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
}

.map-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Locate Button */
.map-locate-btn {
    width: 40px;
    height: 40px;
    margin: 10px;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    color: #333;
    font-size: 18px;
}

.map-locate-btn:hover {
    background: #f5f5f5;
}

/* Info Window */
.map-info-window {
    max-width: 250px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.map-info-window img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.map-info-window h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #333;
}

.map-info-window p {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.map-info-window .price {
    display: inline-block;
    padding: 4px 8px;
    background: #8b5cf6;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.map-info-window .info-link {
    display: block;
    margin-top: 8px;
    padding: 8px;
    background: #0f172a;
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

/* ========================================
   Notification Button
   ======================================== */

.notifications-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notifications-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge.hidden {
    display: none;
}

/* ========================================
   Notification Center
   ======================================== */

.notification-center {
    position: fixed;
    top: 70px;
    left: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 9000;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-center.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.mark-all-btn {
    background: none;
    border: none;
    color: #8b5cf6;
    font-size: 12px;
    cursor: pointer;
}

.mark-all-btn:hover {
    text-decoration: underline;
}

/* List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: white;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notification-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.notification-item.unread {
    background: rgba(139, 92, 246, 0.1);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40%;
    background: #8b5cf6;
    border-radius: 0 2px 2px 0;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.notification-icon.type-like { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.notification-icon.type-comment { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.notification-icon.type-follow { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.notification-icon.type-message { background: rgba(6, 182, 212, 0.2); color: #06b6d4; }
.notification-icon.type-order { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #64748b;
}

/* Empty */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #64748b;
}

.notification-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Footer */
.notification-footer {
    display: block;
    padding: 14px 20px;
    text-align: center;
    color: #8b5cf6;
    text-decoration: none;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-footer:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 14px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    font-size: 18px;
}

.toast-success { border-color: rgba(16, 185, 129, 0.5); }
.toast-success i { color: #10b981; }

.toast-error { border-color: rgba(239, 68, 68, 0.5); }
.toast-error i { color: #ef4444; }

.toast-warning { border-color: rgba(245, 158, 11, 0.5); }
.toast-warning i { color: #f59e0b; }

.toast-info { border-color: rgba(59, 130, 246, 0.5); }
.toast-info i { color: #3b82f6; }

.toast button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.toast button:hover {
    color: white;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
    .notification-center {
        left: 10px;
        right: 10px;
        width: auto;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .toast {
        width: 100%;
    }
}
