/* --- Real-Time Ride Tracking Map Styles --- */
.tracking-map-container {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    margin: 15px 0;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    z-index: 1;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    animation: fadeIn 0.5s ease-out;
}

#tracking-map {
    width: 100%;
    height: 100%;
}

.rickshaw-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.pickup-icon i, .dest-icon i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    font-size: 24px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pickup-icon i {
    animation: pulse 2s infinite ease-in-out;
}

.ride-tracking-card {
    background: var(--white);
    padding: 20px;
    border-radius: 20px;
    border-left: 5px solid var(--available);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

body.dark-theme .tracking-map-container {
    border-color: rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

/* --- Floating Notification System Styles --- */
.notification-wrapper.floating-notification {
    position: fixed;
    top: 100px;
    right: 25px;
    z-index: 2000;
}

.notification-bell {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    font-size: 1.4rem;
    color: var(--secondary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--primary);
}

.notification-bell:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.notification-bell.pulse {
    animation: bellPulse 1.5s infinite;
}

@keyframes bellPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.message-indicator {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: var(--shadow);
}

.notification-bell.pulse .message-indicator {
    opacity: 1;
}

.notification-bell .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--offline);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid var(--white);
    font-weight: bold;
}

.notification-panel {
    position: absolute;
    top: 60px;
    right: 0;
    width: 320px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.05);
    display: none;
    z-index: 2001;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

.notification-panel.show {
    display: block;
}

.panel-header {
    padding: 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h4 { margin: 0; font-size: 1rem; color: var(--secondary); }

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    border-left: 3px solid var(--primary);
    background: rgba(255, 215, 0, 0.05);
}

.notification-item .title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.notification-item .time {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Dark Theme Overrides */
body.dark-theme .notification-bell {
    background: #1e293b;
    border-color: var(--primary);
    color: white;
}

body.dark-theme .notification-panel {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

body.dark-theme .panel-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

body.dark-theme .notification-item {
    border-bottom-color: #334155;
}

body.dark-theme .notification-item:hover {
    background: #0f172a;
}

/* --- Mobile Fixes for Notifications --- */
@media screen and (max-width: 480px) {
    .notification-wrapper.floating-notification {
        top: 80px;
        right: 15px;
    }

    .notification-panel {
        width: 280px;
        max-width: 85vw;
        right: 0;
    }

    .notification-bell {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* --- Share Live Location Styles --- */
.share-ride-btn {
    margin-top: 15px;
    width: 100%;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.share-ride-btn:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

body.dark-theme .share-ride-btn {
    background: #0c4a6e;
    color: #e0f2fe;
    border-color: #075985;
}

.share-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.share-modal-content {
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-option:hover {
    transform: translateY(-5px);
}

.share-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.wa-icon { background: #25D366; }
.tg-icon { background: #0088cc; }
.sms-icon { background: #3b82f6; }

.copy-link-area {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

body.dark-theme .copy-link-area {
    background: #1e293b;
    border-color: #475569;
}

.copy-link-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    color: #64748b;
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- SOS Emergency Styles --- */
.sos-btn {
    width: 100%;
    margin-top: 10px;
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sos-btn.active {
    background: #991b1b;
    animation: sosPulse 1s infinite alternate;
}

@keyframes sosPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    100% { transform: scale(1.03); box-shadow: 0 0 20px 10px rgba(220, 38, 38, 0); }
}

.sos-alert-row {
    background: #fef2f2 !important;
    border-left: 4px solid #dc2626 !important;
    animation: alertFlash 2s infinite;
}

@keyframes alertFlash {
    0% { background: #fef2f2; }
    50% { background: #fee2e2; }
    100% { background: #fef2f2; }
}

.sos-badge {
    background: #dc2626;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.75rem;
    animation: pulse 1s infinite;
}


