/**
 * ===================================
 * NOTIFICATION DROPDOWN STYLES
 * Hiển thị thông báo khi hover/click vào icon
 * ===================================
 */

/* Notification Bell Container */
.notification-bell-container {
    position: relative;
    display: inline-block;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow pointer */
.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dropdown Header */
.notification-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 12px 12px 0 0;
}

.notification-dropdown-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.notification-mark-all-read {
    font-size: 13px;
    color: #3B82F6;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-mark-all-read:hover {
    background: #DBEAFE;
    color: #2563EB;
}

/* Notification Tabs */
.notification-dropdown-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notification-tab {
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.notification-tab:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.notification-tab.active {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

/* Notification List */
.notification-dropdown-list {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown-list::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.notification-dropdown-list::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.notification-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Notification Item in Dropdown */
.notification-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

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

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

.notification-dropdown-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3B82F6;
}

.notification-dropdown-item-content {
    display: flex;
    gap: 12px;
    align-items: start;
}

.notification-dropdown-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

/* Icon Colors by Type */
.notification-dropdown-icon.booking_confirmed {
    background: #DCFCE7;
    color: #16A34A;
}

.notification-dropdown-icon.booking_cancelled {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-dropdown-icon.message_received {
    background: #DBEAFE;
    color: #2563EB;
}

.notification-dropdown-icon.property_expired {
    background: #FEF3C7;
    color: #D97706;
}

.notification-dropdown-icon.property_approved {
    background: #D1FAE5;
    color: #059669;
}

.notification-dropdown-icon.review_approved {
    background: #D1FAE5;
    color: #059669;
}

.notification-dropdown-icon.review_rejected {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-dropdown-icon.review_pending {
    background: #FEF3C7;
    color: #D97706;
}

.notification-dropdown-icon.system {
    background: #F3F4F6;
    color: #6B7280;
}

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

.notification-dropdown-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-dropdown-unread-dot {
    width: 6px;
    height: 6px;
    background: #3B82F6;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-dropdown-text p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-dropdown-time {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty State */
.notification-dropdown-empty {
    padding: 40px 20px;
    text-align: center;
}

.notification-dropdown-empty i {
    font-size: 48px;
    color: #D1D5DB;
    margin-bottom: 12px;
}

.notification-dropdown-empty h4 {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 4px 0;
}

.notification-dropdown-empty p {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0;
}

/* Dropdown Footer */
.notification-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 0 0 12px 12px;
    text-align: center;
}

.notification-dropdown-footer a {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.notification-dropdown-footer a:hover {
    color: #2563EB;
}

/* Loading State */
.notification-dropdown-loading {
    padding: 40px 20px;
    text-align: center;
}

.notification-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #E5E7EB;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.notification-dropdown-loading p {
    margin-top: 12px;
    font-size: 13px;
    color: #6B7280;
}

/* Badge on Bell Icon */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-badge.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Bell Icon Animation */
.notification-bell-icon {
    cursor: pointer;
    transition: all 0.2s;
    color: #6B7280;
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
}

.notification-bell-icon:hover {
    color: #111827;
    background: #F3F4F6;
}

.notification-bell-icon.has-unread {
    animation: bellRing 1s ease-in-out;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

/* Trust Score in Dropdown */
.notification-trust-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.notification-trust-score.high {
    background: #DCFCE7;
    color: #16A34A;
}

.notification-trust-score.medium {
    background: #FEF3C7;
    color: #D97706;
}

.notification-trust-score.low {
    background: #FEE2E2;
    color: #DC2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 360px;
        max-width: calc(100vw - 32px);
        right: -16px;
    }
    
    .notification-dropdown-list {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 320px;
        right: -32px;
    }
    
    .notification-dropdown::before {
        right: 48px;
    }
}

/* Click Outside Overlay */
.notification-dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    pointer-events: none; /* Không chặn sự kiện chuột */
}

.notification-dropdown-overlay.show {
    display: block;
    pointer-events: auto; /* Chỉ bắt click khi hiển thị */
}

/* Action Buttons in Dropdown Item */
.notification-dropdown-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.notification-dropdown-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-dropdown-btn-primary {
    background: #3B82F6;
    color: white;
}

.notification-dropdown-btn-primary:hover {
    background: #2563EB;
}

.notification-dropdown-btn-secondary {
    background: #F3F4F6;
    color: #6B7280;
}

.notification-dropdown-btn-secondary:hover {
    background: #E5E7EB;
    color: #374151;
}

.notification-dropdown-btn-danger {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-dropdown-btn-danger:hover {
    background: #FECACA;
    color: #B91C1C;
}
