/* Transport Marketplace - Notifications */
.transport-notification-bell {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

/* Bell Trigger */
.notification-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notification-trigger:hover {
    background: #f8f9fa;
    border-color: #007cba;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.notification-trigger.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.bell-icon {
    font-size: 18px;
    line-height: 1;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-width: 90vw;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1001;
    margin-top: 8px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Position adjustments */
.transport-notification-bell[data-position="absolute"] .notification-dropdown {
    position: fixed;
}

/* Dropdown Header */
.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.notification-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.unread-count {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* No Notifications */
.no-notifications {
    padding: 40px 20px;
    text-align: center;
}

.no-notifications p {
    margin: 0;
    color: #6c757d;
    font-style: italic;
}

/* Notification Item */
.notification-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: #f0f8ff;
    border-left: 3px solid #007cba;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.notification-message {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-time {
    font-size: 11px;
    color: #888;
}

.notification-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.notification-type.type-task_nearby {
    background: #e3f2fd;
    color: #1976d2;
}

.notification-type.type-offer_received {
    background: #f3e5f5;
    color: #7b1fa2;
}

.notification-type.type-offer_accepted {
    background: #e8f5e8;
    color: #388e3c;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-actions .btn-view-task,
.notification-actions .btn-mark-read {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 12px;
    color: #555;
}

.notification-actions .btn-view-task:hover {
    background: #007cba;
    border-color: #007cba;
    color: white;
    transform: scale(1.1);
}

.notification-actions .btn-mark-read:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
    transform: scale(1.1);
}

/* Notification Footer */
.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.btn-mark-all-read {
    width: 100%;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-mark-all-read:hover {
    background: #005a87;
}

/* Loading State */
.notification-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.notification-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 320px;
        right: -20px;
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-header {
        padding: 12px 16px;
    }
    
    .notification-footer {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .notification-actions {
        opacity: 1; /* Always show on mobile */
    }
}

/* Animation for new notifications */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.notification-trigger.has-new {
    animation: pulse 2s infinite;
}

/* Integration with existing theme */
.transport-notification-bell * {
    box-sizing: border-box;
}

.transport-notification-bell button {
    font-family: inherit;
}

.transport-notification-bell a {
    text-decoration: none;
}

.transport-notification-bell a:focus,
.transport-notification-bell button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}