/* ========================================
   NOTIFICATIONS PAGE - X.COM STYLE
   ======================================== */

/* Notification Badge in Sidebar */
.x-notification-badge {
    position: relative;
    top: 0;
    margin-left: 6px;
    background: #1d9bf0;
    color: white;
    border-radius: 9999px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    vertical-align: middle;
}

/* ========================================
   NOTIFICATIONS PAGE CONTAINER
   ======================================== */
.x-notifications-page {
    background-color: #000000;
    min-height: 100vh;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

#x-notifications-inline-container {
    max-width: 598px !important;
    width: 100% !important;
}

/* ========================================
   HEADER
   ======================================== */
.x-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgb(47, 51, 54);
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}

.x-notifications-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: rgb(231, 233, 234);
    margin: 0;
    line-height: 24px;
}

.x-notifications-settings {
    background: transparent;
    border: none;
    color: rgb(231, 233, 234);
    cursor: pointer;
    padding: 8px;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-notifications-settings:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

/* ========================================
   TABS
   ======================================== */
.x-notifications-tabs {
    display: flex;
    border-bottom: 1px solid rgb(47, 51, 54);
    position: sticky;
    top: 53px;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9;
}

.x-notifications-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgb(113, 118, 123);
    font-size: 15px;
    font-weight: 500;
    padding: 16px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.x-notifications-tab span {
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
    margin-bottom: -16px;
}

.x-notifications-tab:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

.x-notifications-tab.active {
    color: rgb(231, 233, 234);
    font-weight: 700;
}

.x-notifications-tab.active span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: rgb(29, 155, 240);
    border-radius: 2px;
}

/* ========================================
   NOTIFICATIONS LIST
   ======================================== */
.x-notifications-list {
    background-color: #000000;
}

/* ========================================
   NOTIFICATION ARTICLE (X.COM STYLE)
   ======================================== */
.x-notifications-list .x-notif-article,
article.x-notif-article {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    padding: 12px 16px;
    border-bottom: 1px solid rgb(47, 51, 54);
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.x-notif-article:hover {
    background-color: rgba(231, 233, 234, 0.03);
}

/* Unread notification styles with animation */
.x-notif-article.x-notif-unread {
    background-color: rgba(29, 155, 240, 0.08);
    border-left: 3px solid rgb(29, 155, 240);
    animation: notifPulse 2s ease-in-out;
    position: relative;
    transition: background-color 0.5s ease, border-left-color 0.5s ease;
}

.x-notif-article.x-notif-unread::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 10px;
    width: 8px;
    height: 8px;
    background-color: rgb(29, 155, 240);
    border-radius: 50%;
    animation: notifDot 1.5s ease-in-out infinite;
    transition: opacity 0.5s ease;
}

.x-notif-article.x-notif-unread:hover {
    background-color: rgba(29, 155, 240, 0.12);
}

/* Smooth transition when marking as read */
.x-notif-article {
    transition: background-color 0.3s ease, border-left 0.3s ease;
    border-left: 3px solid transparent;
}

/* Animation for new notifications */
@keyframes notifPulse {
    0% {
        background-color: rgba(29, 155, 240, 0.2);
    }
    50% {
        background-color: rgba(29, 155, 240, 0.1);
    }
    100% {
        background-color: rgba(29, 155, 240, 0.08);
    }
}

@keyframes notifDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

/* ========================================
   ICON COLUMN (LEFT)
   ======================================== */
.x-notif-article > .x-notif-icon-col,
.x-notif-icon-col {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding-right: 12px;
    padding-top: 4px;
    box-sizing: border-box;
}

.x-notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon Colors */
.x-notif-icon-like {
    color: rgb(249, 24, 128);
}

.x-notif-icon-comment {
    color: rgb(29, 155, 240);
}

.x-notif-icon-follow {
    color: rgb(29, 155, 240);
}

.x-notif-icon-repost {
    color: rgb(0, 186, 124);
}

.x-notif-icon-mention {
    color: rgb(29, 155, 240);
}

.x-notif-icon-view {
    color: rgb(120, 86, 255);
}

.x-notif-icon-default {
    color: rgb(113, 118, 123);
}

/* ========================================
   CONTENT COLUMN (RIGHT)
   ======================================== */
.x-notif-article > .x-notif-content-col,
.x-notif-content-col {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: block !important;
    box-sizing: border-box;
}

/* ========================================
   AVATAR ROW
   ======================================== */
.x-notif-avatar-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px;
    margin-bottom: 8px;
}

.x-notif-avatar {
    display: inline-block !important;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.x-notif-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    object-fit: cover;
    display: block;
}

.x-notif-avatar:hover img {
    opacity: 0.9;
}

/* ========================================
   TEXT CONTENT
   ======================================== */
.x-notif-text-content {
    display: block !important;
    margin-bottom: 4px;
}

.x-notif-main-text {
    font-size: 15px;
    line-height: 20px;
    color: rgb(231, 233, 234);
    word-wrap: break-word;
}

.x-notif-username {
    font-weight: 700;
    color: rgb(231, 233, 234);
    text-decoration: none;
}

.x-notif-username:hover {
    text-decoration: underline;
}

.x-notif-badge-verified {
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    margin-right: 2px;
}

.x-notif-action-text {
    color: rgb(231, 233, 234);
    font-weight: 400;
}

/* ========================================
   POST PREVIEW
   ======================================== */
.x-notif-post-preview {
    font-size: 15px;
    line-height: 20px;
    color: rgb(113, 118, 123);
    margin-top: 4px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   TIMESTAMP
   ======================================== */
.x-notif-timestamp {
    font-size: 13px;
    line-height: 16px;
    color: rgb(113, 118, 123);
    margin-top: 4px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.x-notifications-empty {
    text-align: center;
    padding: 60px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.x-notifications-empty svg {
    color: rgb(113, 118, 123);
    margin-bottom: 16px;
}

.x-notifications-empty h3 {
    font-size: 31px;
    font-weight: 800;
    color: rgb(231, 233, 234);
    margin: 0 0 8px 0;
    line-height: 36px;
    letter-spacing: -0.3px;
}

.x-notifications-empty p {
    font-size: 15px;
    line-height: 20px;
    color: rgb(113, 118, 123);
    max-width: 340px;
    margin: 0;
}

/* ========================================
   BACKWARD COMPATIBILITY
   (Keep old classes working)
   ======================================== */
.x-notification-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid rgb(47, 51, 54);
    transition: background-color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.x-notification-item:hover {
    background-color: rgba(231, 233, 234, 0.03);
}

.x-notification-item.unread {
    background-color: rgba(29, 155, 240, 0.03);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 500px) {
    .x-notifications-header {
        padding: 12px;
    }

    .x-notif-article {
        padding: 12px;
    }

    .x-notif-icon-col {
        width: 32px;
        padding-right: 8px;
    }

    .x-notif-icon svg {
        width: 24px;
        height: 24px;
    }

    .x-notifications-empty h3 {
        font-size: 24px;
        line-height: 28px;
    }

    .x-notifications-empty {
        padding: 40px 20px;
    }
}
