/* Notification Dropdown Container - Now relative positioning */
.notification-dropdown-container {
    position: relative; /* Changed from fixed */
    display: inline-block; /* Changed to inline-block */
    z-index: 99999;
    cursor: move;
    user-select: none;
    overflow: visible !important;
}

/* Make the bell draggable within header */
.draggable-bell {
    cursor: grab;
    display: inline-block;
    overflow: visible !important;
}

.draggable-bell:active {
    cursor: grabbing;
}

/* Bell Button */
.notification-bell-wrapper {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
    overflow: visible !important;
}

.notification-bell-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px; /* Slightly smaller for header */
    height: 65px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0d6a36;
    font-size: 24px; /* Slightly smaller for header */
    box-shadow: none;
    padding: 0;
    overflow: visible !important;
}

button#notificationBellTrigger:active {
    color: #076936 !important;
    background: none !important;
}

button#notificationBellTrigger:hover {
    color: #076936 !important;
    background: none !important;
}
button#notificationBellTrigger:focus {
    color: #076936 !important;
    background: none !important;
}

.notification-bell-trigger:hover {
    transform: scale(1.05);
    color: #0a562c;
}

.notification-bell-trigger .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 99999;
    line-height: 1;
    font-family: monospace;
    animation: badgePulse 1.5s ease-in-out infinite;
    white-space: nowrap;
    box-sizing: border-box;
    pointer-events: none;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Drag handle area (hidden in header) */
.drag-handle {
    display: none; /* Hide drag handle since it's in header */
}

/* Dropdown Menu - Positioned relative to bell */
.notification-dropdown {
    position: absolute;
    top: 100%; /* Position below the bell */
    right: 0;
    margin-top: 10px; /* Add some space */
    width: 400px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 10000;
    overflow: hidden;
    animation: dropdownSlide 0.3s ease;
    cursor: default;
}

/* Position dropdown on left side if bell is near right edge */
.notification-dropdown-container[data-position="left"] .notification-dropdown {
    right: auto;
    left: 0;
}

.notification-dropdown-container[data-position="right"] .notification-dropdown {
    right: 0;
    left: auto;
}

/* Position dropdown above if not enough space below */
.notification-dropdown-container[data-vertical="top"] .notification-dropdown {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 10px;
}

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

/* Rest of your existing styles... */
.notification-dropdown-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.notification-dropdown-header h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-dropdown-header h3 i {
    color: #0d6a36;
}

.header-notification-count {
    font-size: 12px;
    color: #f59e0b;
    font-weight: normal;
}

.dropdown-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.mark-all-read-dropdown {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #0d6a36;
}

.mark-all-read-dropdown:hover:not(:disabled) {
    background: #e6f7ed;
}

.mark-all-read-dropdown:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-dropdown-content {
    max-height: 500px;
    overflow-y: auto;
}

.loading-notifications-dropdown {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}

.loading-notifications-dropdown i {
    font-size: 24px;
    margin-bottom: 10px;
}

.dropdown-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-notification-item:hover {
    background: #f7fafc;
}

.dropdown-notification-item.unread {
    background: #fef5e7;
}

.dropdown-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.dropdown-notification-icon.quote {
    background: #fef3c7;
    color: #f59e0b;
}

.dropdown-notification-icon.bid {
    background: #e6f7ed;
    color: #0d6a36;
}

.dropdown-notification-icon i {
    font-size: 16px;
}

.dropdown-notification-content {
    flex: 1;
    min-width: 0;
}

.dropdown-notification-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 4px;
}

.dropdown-notification-message {
    color: #4a5568;
    font-size: 12px;
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.dropdown-notification-time {
    font-size: 10px;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-notification-badge {
    margin-left: 8px;
    flex-shrink: 0;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    display: inline-block;
}

.bid-amount {
    font-weight: bold;
    color: #0d6a36;
}

.notification-dropdown-footer {
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.load-more-dropdown {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.load-more-dropdown:hover {
    background: #e2e8f0;
}

.no-notifications-dropdown {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
}

.no-notifications-dropdown i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.no-notifications-dropdown p {
    font-size: 14px;
    margin: 0;
}

.notification-dropdown-container.minimized .notification-dropdown {
    display: none;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 350px;
        right: 0;
    }
    
    .notification-dropdown-container[data-position="left"] .notification-dropdown {
        left: 0;
        right: auto;
    }
    
    .notification-bell-trigger {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
    
    .notification-bell-trigger .notification-badge {
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        padding: 0 3px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 320px;
        right: 0;
    }
    
    .notification-bell-trigger {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Position Save Toast */
.position-save-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 100001;
    pointer-events: none;
    animation: fadeOut 2s ease forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Force bell visibility */
.notification-dropdown-container,
.notification-bell-wrapper,
.notification-bell-trigger,
.draggable-bell {
    overflow: visible !important;
}

.notification-bell-trigger .notification-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    z-index: 99999 !important;
}