/* SPDX-FileCopyrightText: Syntropical */
/* SPDX-License-Identifier: LicenseRef-Proprietary */

/* IA Hub Specific Styles */

/* Navigation */
.via-app-bar {
    background: linear-gradient(135deg, var(--via-primary, #0F2438) 0%, var(--via-secondary, #C2A24A) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.via-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    min-height: 64px;
}

.via-toolbar-left, .via-toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.via-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.via-logo span {
    background: white;
    color: var(--via-primary, #0F2438);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
}

/* Search Bar */
.via-search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.via-search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.via-search-container input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.via-search-container input:focus {
    outline: none;
    border-color: var(--via-primary, #0F2438);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Icons and Buttons */
.via-icon-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.via-icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.via-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

/* User Menu */
.via-user-menu {
    position: relative;
}

.via-user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.via-user-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.via-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.via-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.via-user-dropdown.show {
    display: block;
}

.via-user-info {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.via-user-info .via-user-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    background: var(--via-primary, #0F2438);
    color: white;
}

.via-user-name {
    font-weight: 600;
    color: #111827;
}

.via-user-email {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.via-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.via-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.via-dropdown-item i {
    font-size: 1.1rem;
    color: #6b7280;
    width: 24px;
    text-align: center;
}

.via-dropdown-item:hover {
    background: #f9fafb;
    color: var(--via-primary, #0F2438);
}

.via-dropdown-item:hover i {
    color: var(--via-primary, #0F2438);
}

/* Notifications */
.via-notification-container {
    position: relative;
}

.via-notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.via-notification-dropdown.show {
    display: block;
}

.via-notification-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.via-notification-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

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

.via-mark-all-read:hover {
    background: #f5f3ff;
}

.via-notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.via-notification-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.via-notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

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

.via-notification-item:hover {
    background: #f9fafb;
}

.via-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f9ff;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.via-notification-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.via-notification-message {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.via-notification-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.via-notification-footer a {
    color: var(--via-primary, #0F2438);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

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

/* Side Navigation Drawer */
.via-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.via-drawer.open {
    transform: translateX(0);
}

.via-drawer-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.via-drawer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.via-drawer-logo i {
    color: var(--via-primary, #0F2438);
    font-size: 1.5rem;
}

.via-close-drawer {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.via-close-drawer:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.via-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.via-drawer-section {
    margin-bottom: 1.5rem;
}

.via-drawer-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.via-drawer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
}

.via-drawer-item i {
    font-size: 1.25rem;
    color: #9ca3af;
    width: 24px;
    text-align: center;
}

.via-drawer-item:hover {
    background: #f9fafb;
    color: var(--via-primary, #0F2438);
}

.via-drawer-item:hover i {
    color: var(--via-primary, #0F2438);
}

.via-drawer-item.active {
    background: #f5f3ff;
    color: var(--via-primary, #0F2438);
    border-right: 3px solid var(--via-primary, #0F2438);
}

.via-drawer-item.active i {
    color: var(--via-primary, #0F2438);
}

.via-drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #9ca3af;
}

.via-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.via-drawer-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .via-search-container {
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .via-search-container {
        display: none;
    }
    
    .via-drawer {
        width: 260px;
    }
}

/* Content Area */
.ia-content {
    padding-top: 1rem;
    min-height: calc(100vh - 64px);
    background: #f9fafb;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
}

.page-header p {
    margin: 0.5rem 0 0;
    color: #6b7280;
}

/* Content Card */
.content-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card h2 i {
    color: var(--via-primary, #0F2438);
}
