/* Panel de Notificaciones - Diseño EXACTO del HTML de referencia */

/* Wrapper para evitar conflictos */
#notificationPanelWrapper {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    pointer-events: auto !important;
    z-index: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

#notificationPanelWrapper * {
    pointer-events: auto !important;
}

/* Overlay - EXACTO del HTML de referencia */
.notifications-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    z-index: 998 !important;
}

.notifications-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Panel lateral - EXACTO del HTML de referencia */
.notifications-panel {
    position: fixed !important;
    top: 0 !important;
    left: -400px !important;
    width: 400px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: white !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
    transition: left 0.3s ease !important;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
}

.notifications-panel.active {
    left: 0 !important;
}

#notificationsPanel {
    position: fixed !important;
    top: 0 !important;
    left: -400px !important;
    width: 400px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: white !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
    transition: left 0.3s ease !important;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
}

#notificationsPanel.active {
    left: 0 !important;
}

/* Asegurar que el header del sitio esté visible cuando el panel esté abierto */
.header-area {
    z-index: 1000 !important;
}

/* Header del panel - EXACTO del HTML de referencia */
.panel-header {
    padding: 20px !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.panel-header h2 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.panel-header-actions {
    display: flex !important;
    gap: 8px !important;
}

.btn-icon {
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: transparent !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #666 !important;
    transition: background-color 0.2s !important;
}

.btn-icon:hover:not(:disabled) {
    background-color: #f0f0f0 !important;
}

.btn-icon:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Tabs - EXACTO del HTML de referencia */
.notification-tabs {
    display: flex !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 0 20px !important;
}

.tab {
    padding: 12px 16px !important;
    background: none !important;
    border: none !important;
    color: #666 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s !important;
}

.tab:hover {
    color: #333 !important;
}

.tab.active {
    color: #007bff !important;
    border-bottom-color: #007bff !important;
}

/* Lista de notificaciones - EXACTO del HTML de referencia */
.notifications-list {
    flex: 1 !important;
    overflow-y: auto !important;
    background: #f8f9fa !important;
}

.notification-item {
    background: white !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    position: relative !important;
}

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

.notification-item.unread {
    background-color: #f0f8ff !important;
}

.notification-item.unread::before {
    content: '' !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #007bff !important;
}

.notification-content {
    display: flex !important;
    gap: 12px !important;
    padding-left: 8px !important;
}

.notification-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.notification-icon.message {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

.notification-icon.sale {
    background: #e8f5e9 !important;
    color: #388e3c !important;
}

.notification-icon.offer {
    background: #fff3e0 !important;
    color: #f57c00 !important;
}

.notification-icon.system {
    background: #f3e5f5 !important;
    color: #7b1fa2 !important;
}

.notification-icon.order,
.notification-icon.shipping,
.notification-icon.cancellation,
.notification-icon.delivered {
    background: #f3e5f5 !important;
    color: #7b1fa2 !important;
}

.notification-icon.review {
    background: #fffde7 !important;
    color: #fbc02d !important;
}

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

.notification-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #333 !important;
    margin-bottom: 4px !important;
}

.notification-text {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
}

.notification-time {
    font-size: 12px !important;
    color: #999 !important;
}

.notification-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.btn-notification {
    padding: 6px 12px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.btn-notification:hover {
    background: #f8f9fa !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

.btn-notification.primary {
    background: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.btn-notification.primary:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* Estado vacío - EXACTO del HTML de referencia */
.empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    text-align: center !important;
    color: #999 !important;
}

.empty-state-icon {
    font-size: 48px !important;
    margin-bottom: 16px !important;
    opacity: 0.3 !important;
}

.empty-state h3 {
    font-size: 16px !important;
    color: #666 !important;
    margin-bottom: 8px !important;
}

.empty-state p {
    font-size: 14px !important;
    color: #999 !important;
}

/* Footer del panel - EXACTO del HTML de referencia */
.panel-footer {
    padding: 16px 20px !important;
    background: white !important;
    border-top: 1px solid #e0e0e0 !important;
}

.btn-view-all {
    width: 100% !important;
    padding: 12px !important;
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #007bff !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.btn-view-all:hover {
    background: #e9ecef !important;
    border-color: #007bff !important;
}

/* Scrollbar personalizada - EXACTO del HTML de referencia */
.notifications-list::-webkit-scrollbar {
    width: 6px !important;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 3px !important;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #999 !important;
}

/* Badge de notificaciones en el header */
.notification-bell {
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #333 !important;
    transition: background-color 0.2s !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.notification-bell:hover {
    background-color: #f0f0f0 !important;
}

.notification-bell ion-icon {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    color: inherit !important;
}

.notification-bell .badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #dc3545 !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    min-width: 18px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Responsive - EXACTO del HTML de referencia */
@media (max-width: 768px) {
    .notifications-panel {
        width: 100% !important;
        max-width: 100vw !important;
        left: -100% !important;
    }
    
    #notificationsPanel {
        width: 100% !important;
        max-width: 100vw !important;
        left: -100% !important;
    }
}
