/* AnimeHub Notification System Styles */

.ah-notif-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ah-notif-bell-btn {
    position: relative;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    color: #9ba1b0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.25s ease;
    margin-right: 6px;
    padding: 0;
}

.ah-notif-bell-btn:hover {
    background: transparent;
    border: none;
    color: #ffffff;
    transform: none;
}

.ah-notif-bell-btn svg {
    width: 20px;
    height: 20px;
    color: inherit;
    transition: color 0.25s ease;
}

.ah-notif-bell-btn:hover svg {
    transform: none;
    color: #ffffff;
}

.ah-notif-badge {
    position: absolute;
    top: 0px;
    right: 1px;
    background: #ff4757;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
    border: 2px solid #0d0e12;
    line-height: 1;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

/* Dropdown */
.ah-notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    max-height: 480px;
    background: #15171e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ahNotifFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .ah-notif-dropdown {
        position: fixed;
        top: calc(58px + env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 76px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        margin: 0 auto;
        border-radius: 16px;
    }
}

@keyframes ahNotifFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ah-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ah-notif-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.ah-notif-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ah-notif-actions button {
    background: none;
    border: none;
    color: #a0a6b5;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.ah-notif-actions button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ah-notif-gear-link {
    color: #a0a6b5;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
}

.ah-notif-gear-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ah-notif-gear-link svg {
    width: 16px;
    height: 16px;
}

.ah-notif-list {
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #3a3d46 transparent;
}

.ah-notif-list::-webkit-scrollbar {
    width: 5px;
}

.ah-notif-list::-webkit-scrollbar-track {
    background: transparent;
}

.ah-notif-list::-webkit-scrollbar-thumb {
    background: #3a3d46;
    border-radius: 4px;
    transition: background 0.2s;
}

.ah-notif-list::-webkit-scrollbar-thumb:hover {
    background: #ff4d6d;
}

.ah-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.ah-notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ah-notif-item.unread {
    background: rgba(255, 71, 87, 0.06);
}

.ah-notif-item.unread:hover {
    background: rgba(255, 71, 87, 0.1);
}

.ah-notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.ah-notif-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ah-notif-item-body {
    flex: 1;
    min-width: 0;
}

.ah-notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1.3;
}

.ah-notif-item-text {
    font-size: 12px;
    color: #9ba1b0;
    line-height: 1.4;
    word-break: break-word;
}

.ah-notif-item-time {
    font-size: 10px;
    color: #646b7a;
    margin-top: 4px;
}

.ah-notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: #6c7283;
    font-size: 13px;
}

/* Subscribe button styles on detail pages */
.ad-btn.subscribed,
.md-btn.subscribed {
    background: rgba(46, 213, 115, 0.15) !important;
    border-color: rgba(46, 213, 115, 0.4) !important;
    color: #2ed573 !important;
}

.ad-btn.subscribed svg,
.md-btn.subscribed svg {
    color: #2ed573 !important;
    fill: #2ed573 !important;
}
