/* Notification Center Styles */
.notification-dropdown .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xl) !important;
}

/* Force visibility for manual toggle */
#notifPanel.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
    pointer-events: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
    cursor: pointer;
}

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

.notif-item.unread {
    background: rgba(var(--accent-cyan-rgb, 6, 182, 212), 0.1);
    border-left: 3px solid var(--accent-cyan);
}

.notif-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.notif-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notif-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* New Tabs Styling - Classy & Sophisticated */
.notif-tabs {
    display: flex;
    padding: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.notif-tab {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.notif-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.notif-tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    background: transparent;
}

/* Active Tab Indicator Glow */
.notif-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 -2px 10px rgba(6, 182, 212, 0.5);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Scanner Widget Styles */
#scanner-container {
    position: fixed;
    bottom: 8.5rem;
    /* Above feedback button */
    left: 2rem;
    z-index: 9999;
}

.scanner-fab {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.scanner-fab:hover {
    background: linear-gradient(135deg, #22d3ee 0%, #60a5fa 100%);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.6);
}

/* Chatbot Widget Styles */
#chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Suggestion Bubble */
.chat-suggestion {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: -70px;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 320px;
    width: max-content;
    pointer-events: none;
    /* Disable clicks when hidden */
    border: 1px solid var(--accent-cyan);
}

.chat-suggestion.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-suggestion::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    transform: rotate(45deg);
    border-right: 1px solid var(--accent-cyan);
    border-bottom: 1px solid var(--accent-cyan);
}

.chat-suggestion:hover {
    transform: translateY(-2px);
    background: var(--bg-tertiary);
}

.chat-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.5);
}

/* Chat Window */
.chat-window {
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    bottom: 80px;
    right: 0;
    pointer-events: none;
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.chat-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-close:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    gap: 4px;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    border: 1px solid var(--border-subtle);
    margin-bottom: 0.5rem;
    width: fit-content;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.typing-indicator.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    /* Lighter than muted for visibility */
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.user-message {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.chat-input-area {
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #06b6d4;
}

.chat-send {
    background: #0f172a;
    color: white;
    border: none;
    width: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

/* Markdown Content in Chat */
.message p {
    margin: 0 0 0.5rem 0;
}

.message p:last-child {
    margin: 0;
}

.message ul,
.message ol {
    margin: 0 0 0.5rem 1.25rem;
    padding: 0;
}

.message code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85em;
}

.user-message code {
    background: rgba(255, 255, 255, 0.2);
}

/* Feedback Styles */
#feedback-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.feedback-fab {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.feedback-fab:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.feedback-window {
    width: 350px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    bottom: 80px;
    left: 0;
    pointer-events: none;
}

.feedback-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Shadow IT Scanner Results Modal */
#shadow-it-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#shadow-it-results-modal.active {
    display: flex;
}

.results-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#shadow-it-results-modal.active .results-modal-content {
    transform: scale(1);
    opacity: 1;
}

.results-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.results-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-modal-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.results-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.results-item:last-child {
    margin-bottom: 0;
}

.results-item i {
    font-size: 1.5rem;
    color: var(--accent-red);
}

.results-item-info {
    flex: 1;
}

.results-item-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.results-item-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.results-modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.scan-progress {
    text-align: center;
    padding: 2rem 0;
}

.scan-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(6, 182, 212, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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