/* ===== ZENTHOS TOPBAR STYLES ===== */

/* Topbar Container */
.topbar {
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Page Title */
.page-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
}

/* Search Container */
.search-container {
    width: 300px;
}

.search-input {
    padding: 8px 16px 8px 40px;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    background-color: #f8f9fa;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input:focus + .search-icon {
    color: #667eea;
}

/* Notification Button */
.notification-btn {
    position: relative;
    color: #6c757d;
    border: none;
    background: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
    transform: scale(1.1);
}

.notification-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notifications Dropdown */
.notifications-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 8px;
}

.notifications-dropdown .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 20px;
}

.notification-item {
    padding: 12px 20px;
    border: none;
    transition: all 0.2s ease;
}

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

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 2px;
}

.notification-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* User Profile Section */
.user-profile-btn {
    border: none;
    background: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.user-profile-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.user-profile-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-info {
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    white-space: nowrap;
}

.user-role {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

.user-dropdown-arrow {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.user-profile-btn[aria-expanded="true"] .user-dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    width: 280px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 8px;
}

.user-dropdown .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px;
}

.user-dropdown .dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.user-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(4px);
}

.user-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.user-dropdown .dropdown-item.text-danger:hover {
    background-color: #fff5f5;
    color: #dc3545;
}

.user-dropdown .dropdown-item.text-danger i {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-container {
        width: 200px;
    }

    .user-info {
        display: none;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .topbar {
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .search-container {
        width: 150px;
    }

    .search-input {
        font-size: 0.8rem;
        padding: 6px 12px 6px 32px;
    }

    .notifications-dropdown,
    .user-dropdown {
        width: 90vw;
        max-width: 300px;
    }

    .page-title {
        font-size: 1.1rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .topbar {
        background-color: rgba(33, 37, 41, 0.95) !important;
        border-bottom-color: #495057;
    }

    .page-title {
        color: #f8f9fa;
    }

    .search-input {
        background-color: #495057;
        border-color: #6c757d;
        color: #f8f9fa;
    }

    .search-input:focus {
        background-color: #6c757d;
    }

    .search-input::placeholder {
        color: #adb5bd;
    }
}

/* Loading States */
.search-input.loading {
    background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility Improvements */
.notification-btn[aria-expanded="true"],
.user-profile-btn[aria-expanded="true"] {
    background-color: #f8f9fa;
}

/* Focus visible for better keyboard navigation */
.search-input:focus-visible,
.notification-btn:focus-visible,
.user-profile-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
