/**
 * Smart Notification Bell Widget Styles
 * Pretpot Elementor Kit PRO
 */

/* Base Widget Container */
.pretpot-smart-notification-bell {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 999;
}

/* Main Bell Container */
.pretpot-snb-bell-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-width: var(--snb-collapsed-width, 80px);
}

.pretpot-snb-bell-container.pretpot-snb-expanded {
    max-width: var(--snb-expanded-width, 400px);
    padding: 12px 20px;
}

/* Bell Icon Box */
.pretpot-snb-icon-box {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.pretpot-snb-bell-container:hover .pretpot-snb-icon-box {
    background: rgba(255, 255, 255, 0.1);
}

/* Bell Icon */
.pretpot-snb-bell-icon {
    width: 28px;
    height: 28px;
    fill: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.pretpot-snb-bell-container:hover .pretpot-snb-bell-icon {
    fill: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
}

/* Notification Badge */
.pretpot-snb-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid rgba(30, 30, 30, 0.8);
    font-size: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 4px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.pretpot-snb-bell-container.pretpot-snb-has-notifications .pretpot-snb-badge {
    opacity: 1;
    transform: scale(1);
}

/* Content Area (Hidden when collapsed) */
.pretpot-snb-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.pretpot-snb-bell-container.pretpot-snb-expanded .pretpot-snb-content {
    margin-left: 16px;
    max-width: 300px;
    opacity: 1;
}

/* Text Content */
.pretpot-snb-text-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pretpot-snb-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.pretpot-snb-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

/* Accordion Toggle Button */
.pretpot-snb-toggle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
}

.pretpot-snb-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.pretpot-snb-toggle svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.pretpot-snb-toggle.pretpot-snb-active svg {
    transform: rotate(180deg);
}

/* Notification Panel */
.pretpot-snb-panel {
    position: absolute;
    top: calc(100% + 12px);
    width: var(--snb-panel-width, 380px);
    max-width: calc(100vw - 40px);
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 0;
    overflow: hidden;
    z-index: 1000;
}

/* Panel positioning - auto-detect edges */
.pretpot-snb-panel.pretpot-snb-panel-left {
    left: 0;
    right: auto;
}

.pretpot-snb-panel.pretpot-snb-panel-right {
    right: 0;
    left: auto;
}

.pretpot-snb-panel.pretpot-snb-panel-center {
    left: 50%;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
}

.pretpot-snb-panel.pretpot-snb-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
    max-height: var(--snb-max-height, 600px);
    overflow-y: auto;
}

.pretpot-snb-panel.pretpot-snb-open.pretpot-snb-panel-center {
    transform: translateX(-50%) translateY(0) scale(1);
}

/* News Items */
.pretpot-snb-news-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: pretpot-snb-slideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.pretpot-snb-news-item:last-child {
    border-bottom: none;
}

.pretpot-snb-news-item:nth-child(1) { animation-delay: 0.05s; }
.pretpot-snb-news-item:nth-child(2) { animation-delay: 0.1s; }
.pretpot-snb-news-item:nth-child(3) { animation-delay: 0.15s; }
.pretpot-snb-news-item:nth-child(4) { animation-delay: 0.2s; }
.pretpot-snb-news-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes pretpot-snb-slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Image */
.pretpot-snb-news-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pretpot-snb-news-image.pretpot-snb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
}

/* News Content */
.pretpot-snb-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pretpot-snb-news-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.pretpot-snb-news-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.pretpot-snb-news-button {
    display: inline-flex;
    align-self: flex-start;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pretpot-snb-news-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 1);
}

/* Separator Line */
.pretpot-snb-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 -20px;
    width: calc(100% + 40px);
}

/* Empty State */
.pretpot-snb-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.pretpot-snb-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Right-aligned variant */
.pretpot-smart-notification-bell.pretpot-snb-align-right {
    align-items: flex-end;
}

.pretpot-smart-notification-bell.pretpot-snb-align-right .pretpot-snb-panel {
    right: 0;
    left: auto;
}

.pretpot-smart-notification-bell.pretpot-snb-align-right .pretpot-snb-bell-container.pretpot-snb-expanded {
    flex-direction: row-reverse;
}

.pretpot-smart-notification-bell.pretpot-snb-align-right .pretpot-snb-bell-container.pretpot-snb-expanded .pretpot-snb-content {
    margin-left: 0;
    margin-right: 16px;
}

/* Scrollbar Styling */
.pretpot-snb-panel::-webkit-scrollbar {
    width: 6px;
}

.pretpot-snb-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.pretpot-snb-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.pretpot-snb-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .pretpot-snb-panel {
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }
    
    .pretpot-snb-bell-container.pretpot-snb-expanded {
        max-width: calc(100vw - 40px);
    }
}