/**
 * Konveyit Teachers - Header Styles
 * Notification dropdown and user menu styles
 */

/* Dropdown Panel Base */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 320px;
}

.dropdown-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Notification Dropdown */
.notification-dropdown {
    width: 380px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.dropdown-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark, #1f2937);
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-color, #6366f1);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.mark-all-read:hover {
    background: rgba(99, 102, 241, 0.1);
}

.dropdown-content {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.dropdown-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border, #e5e7eb);
    text-align: center;
}

.dropdown-footer a {
    color: var(--primary-color, #6366f1);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-footer a:hover {
    text-decoration: underline;
}

/* Notification Items */
.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

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

.notification-item:hover {
    background: var(--background, #f9fafb);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-item.unread:hover {
    background: rgba(99, 102, 241, 0.1);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--background, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

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

.notification-title {
    font-weight: 600;
    color: var(--text-dark, #1f2937);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    color: var(--text-light, #6b7280);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-light, #6b7280);
    margin-top: 0.25rem;
}

.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color, #6366f1);
    border-radius: 50%;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Empty State */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-light, #6b7280);
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* Loading Spinner */
.loading-spinner {
    padding: 2rem;
    text-align: center;
    color: var(--text-light, #6b7280);
}

/* User Menu */
.user-menu {
    width: 260px;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.user-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #ec4899));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.user-menu-info {
    flex: 1;
    min-width: 0;
}

.user-menu-name {
    font-weight: 600;
    color: var(--text-dark, #1f2937);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-email {
    font-size: 0.8rem;
    color: var(--text-light, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-divider {
    height: 1px;
    background: var(--border, #e5e7eb);
    margin: 0.25rem 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark, #1f2937);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.user-menu-item:hover {
    background: var(--background, #f9fafb);
}

.user-menu-item .menu-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.user-menu-item.logout-item {
    color: var(--secondary-color, #ec4899);
}

.user-menu-item.logout-item:hover {
    background: rgba(236, 72, 153, 0.1);
}

/* Notification Button Updates */
.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-btn:hover {
    background: var(--background, #f9fafb);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--secondary-color, #ec4899);
    color: white;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 4px;
}

/* User Avatar Updates */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #ec4899));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 2rem);
        right: -1rem;
    }

    .user-menu {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

@media (max-width: 480px) {
    .notification-dropdown,
    .user-menu {
        position: fixed;
        top: var(--header-height, 70px);
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - var(--header-height, 70px) - 20px);
        border-radius: 0 0 12px 12px;
    }
}
