/* Chat Header */
.chat-header-container {
    width: 100%;
    background-color: var(--bg-body);
    /* Match body background */
    backdrop-filter: blur(10px);
    /* Optional: adds a nice blur effect if opacity is < 1 */
    position: absolute;
    /* Overlay or stick to top */
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    /* Prepare for scroll border if needed */
    transition: border-color 0.2s;
}

/* Match Media Creator: Transparent header in empty state */
.main-content.empty-state .chat-header-container {
    background-color: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
}

.chat-header-container .canvas-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    position: relative;
    /* For dropdown positioning */
    background-color: transparent !important;
    /* Override canvas.css */
    border-bottom: none !important;
    /* Override canvas.css */
}

/* Left side container for selector and info button */
.chat-header-container .header-left {
    display: flex;
    align-items: center;
    margin-right: auto;
    /* Push actions to right */
    gap: 12px;
}

.active-gem-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--accent-color);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.active-gem-badge .gem-icon {
    font-size: 1.1rem;
}

.active-gem-badge .gem-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-gem-badge .clear-gem-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.active-gem-badge .clear-gem-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Reuse Create Media styles for header elements */
.chat-header-container .model-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--bg-surface);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.chat-header-container .model-select-trigger:hover {
    background-color: var(--bg-surface-hover);
}

.chat-header-container .model-info-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.chat-header-container .model-info-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.chat-header-container .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Notifications in Header */
.notifications-wrapper {
    position: relative;
}

.header-notifications {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    position: relative;
}

.header-notifications:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.header-notifications .notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-notifications .notification-badge.hidden {
    display: none;
}

/* Notifications Dropdown in Header */
.notifications-wrapper .notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 320px;
    max-height: 400px;
    overflow: hidden;
}

.notifications-wrapper .notifications-dropdown.hidden {
    display: none;
}

.notifications-wrapper .notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.notifications-wrapper .mark-all-read-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.notifications-wrapper .mark-all-read-btn:hover {
    background: rgba(243, 123, 32, 0.1);
}

.notifications-wrapper .notifications-list {
    max-height: 320px;
    overflow-y: auto;
}

.notifications-wrapper .empty-notifications {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notifications-wrapper .notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.notifications-wrapper .notification-item:last-child {
    border-bottom: none;
}

.notifications-wrapper .notification-item:hover {
    background: var(--bg-surface-hover);
}

.notifications-wrapper .notification-item.unread {
    background: rgba(243, 123, 32, 0.05);
}

.notifications-wrapper .notification-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

.notifications-wrapper .notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notifications-wrapper .notification-content {
    flex: 1;
    min-width: 0;
}

.notifications-wrapper .notification-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notifications-wrapper .notification-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notifications-wrapper .notification-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.notifications-wrapper .notification-row {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 3px;
    display: flex;
    gap: 6px;
}

.notifications-wrapper .notification-row .label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 50px;
}

/* Dropdown Styles - moved to dropdowns.css */