/* Notification Center Styles */

/* Badge styling */
#notifications-count-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    display: none;
}

/* Dropdown menu styling */
.notifications-dropdown-menu {
    width: 400px;
    max-height: 600px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.notifications-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-dropdown-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.notifications-header-actions {
    display: flex;
    gap: 8px;
}

.notifications-header-actions .btn {
    padding: 4px 12px;
    font-size: 12px;
}

#notifications-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s, opacity 0.3s;
    cursor: default;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e7f3ff;
}

.notification-item.unread:hover {
    background-color: #d0e7ff;
}

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

.notification-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-icon-success {
    color: #28a745;
}

.notification-icon-error {
    color: #dc3545;
}

.notification-icon-warning {
    color: #ffc107;
}

.notification-icon-info {
    color: #17a2b8;
}

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

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

.notification-time {
    font-size: 12px;
    color: #6c757d;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.btn-notification-delete {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-notification-delete:hover {
    color: #dc3545;
}

.notifications-dropdown-footer {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.notifications-dropdown-footer a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

/* Full page notifications */
.notifications-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.notifications-page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.notifications-page-actions {
    display: flex;
    gap: 12px;
}

.notifications-page-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.notifications-page-list .notification-item {
    border-bottom: 1px solid #e9ecef;
}

.notifications-page-list .notification-item:last-child {
    border-bottom: none;
}

.notifications-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.notifications-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #dee2e6;
}

.notifications-empty p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.notifications-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Loading state */
.notifications-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.notifications-loading i {
    animation: spin 1s linear infinite;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .notifications-dropdown-menu {
        width: calc(100vw - 20px);
        max-width: 380px;
        /* Let Bootstrap handle positioning with dropdown-menu-end */
        left: auto !important;
        right: 10px !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .notifications-dropdown-menu {
        width: calc(100vw - 16px);
        max-width: none;
        right: 8px !important;
    }

    .notifications-dropdown-header {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .notifications-dropdown-header h6 {
        font-size: 14px;
    }

    .notifications-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .notifications-header-actions .btn {
        padding: 4px 10px;
        font-size: 11px;
        flex: 1;
    }

    .notification-item {
        padding: 10px 12px;
    }

    .notification-content {
        gap: 10px;
    }

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

    .notification-message {
        font-size: 13px;
    }

    .notification-time {
        font-size: 11px;
    }

    .notifications-page-header h1 {
        font-size: 24px;
    }

    .notifications-page-actions {
        width: 100%;
        justify-content: space-between;
    }
}
