/* ============================================
   Notifications Bell + Modal
   ============================================ */

/* Bell Button */
.notif-bell {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.notif-bell-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.2s;
}

.notif-bell:hover .notif-bell-img {
    transform: scale(1.15);
}

.notif-bell:active .notif-bell-img {
    transform: scale(0.95);
}

/* Shake animation on new notification */
.notif-bell.shaking .notif-bell-img {
    animation: bellShake 0.6s ease;
}

@keyframes bellShake {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

/* Badge */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #010c06;
}

/* Badge border for header bell */
.shop-header-bell .notif-badge {
    border-color: #0d2563;
}

/* ============================================
   Modal Overlay
   ============================================ */
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notif-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Modal Panel
   ============================================ */
.notif-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: #0a1a0d;
    z-index: 1070;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-modal.open {
    transform: translateX(0);
}

/* Modal Header */
.notif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.notif-modal-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-modal-title i {
    color: #ffd401;
}

.notif-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background-color 0.2s, color 0.2s;
}

.notif-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Modal Body */
.notif-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Loading */
.notif-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
}

.notif-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffd401;
    border-radius: 50%;
    animation: notifSpin 0.7s linear infinite;
}

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

.notif-loading-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Empty State */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.notif-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 212, 1, 0.1);
    border: 2px solid rgba(255, 212, 1, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.notif-empty-icon i {
    font-size: 1.8rem;
    color: #ffd401;
}

.notif-empty-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.notif-empty-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Error State */
.notif-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 12px;
}

.notif-error i {
    font-size: 2rem;
    color: #ffd401;
}

.notif-error p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ============================================
   Notification Card
   ============================================ */
.notif-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s;
}

.notif-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-card-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notif-card-img-placeholder {
    background: rgba(255, 212, 1, 0.15);
}

.notif-card-cininho {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.notif-card-content {
    flex: 1;
    min-width: 0;
}

.notif-card-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.notif-card-body {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-card-time {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Load More Button */
.notif-load-more {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.notif-load-more:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================
   Shimmer Loading Cards
   ============================================ */
.notif-shimmer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
}

.notif-shimmer-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: notifShimmer 1.5s infinite;
    flex-shrink: 0;
}

.notif-shimmer-lines {
    flex: 1;
}

.notif-shimmer-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: notifShimmer 1.5s infinite;
}

.notif-shimmer-line:nth-child(1) { width: 70%; }
.notif-shimmer-line:nth-child(2) { width: 90%; }
.notif-shimmer-line:nth-child(3) { width: 40%; }

@keyframes notifShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 767.98px) {
    .notif-modal {
        width: 100vw;
    }

    /* Hide desktop bell on mobile */
    .notif-bell-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) {
    /* Hide mobile bell on desktop */
    .notif-bell-mobile {
        display: none !important;
    }
}
