/**
 * Terniq AI Theme Styles
 * Modern, clean design matching the Terniq AI website aesthetic
 */

/* CSS Variables for Terniq AI Theme */
:root {
    --terniq-primary: #2563eb;
    --terniq-primary-hover: #1d4ed8;
    --terniq-secondary: #64748b;
    --terniq-success: #10b981;
    --terniq-warning: #f59e0b;
    --terniq-danger: #ef4444;
    --terniq-white: #ffffff;
    --terniq-gray-50: #f8fafc;
    --terniq-gray-100: #f1f5f9;
    --terniq-gray-200: #e2e8f0;
    --terniq-gray-300: #cbd5e1;
    --terniq-gray-500: #64748b;
    --terniq-gray-600: #475569;
    --terniq-gray-700: #334155;
    --terniq-gray-800: #1e293b;
    --terniq-gray-900: #0f172a;
    
    /* Typography */
    --terniq-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Shadows */
    --terniq-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --terniq-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --terniq-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --terniq-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Global Font */
body {
    font-family: var(--terniq-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top Navigation Bar */
.terniq-navbar {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar container - the actual floating rounded box */
.terniq-navbar-container {
    background: var(--terniq-white);
    border: 1px solid var(--terniq-gray-200);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    margin: 0 auto;
    width: 60%;
    max-width: 1200px;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar scroll behavior - flowing effect like Terniq website */
.terniq-navbar.navbar-scrolled {
    padding: 0.5rem 0;
}

.terniq-navbar.navbar-scrolled .terniq-navbar-container {
    width: 25%;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* Hide user info text when scrolled (to save space) */
.terniq-navbar.navbar-scrolled .terniq-user-info-desktop {
    display: none !important;
}

/* Hide chevron when scrolled */
.terniq-navbar.navbar-scrolled .terniq-user-chevron {
    display: none !important;
}

/* Brand and Logo */
.terniq-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.terniq-brand:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.terniq-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1));
    transition: all 0.3s ease;
}

/* Smaller logo when scrolled */
.terniq-navbar.navbar-scrolled .terniq-logo {
    width: 24px;
    height: 24px;
}

.terniq-brand-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--terniq-gray-900);
    letter-spacing: -0.025em;
    transition: all 0.3s ease;
}

/* Smaller text when scrolled */
.terniq-navbar.navbar-scrolled .terniq-brand-text {
    font-size: 1.125rem;
}

.terniq-ai {
    color: var(--terniq-gray-900);
    font-weight: 700;
}

/* Sidebar Toggle Button */
.terniq-sidebar-toggle {
    color: var(--terniq-gray-600);
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.terniq-sidebar-toggle:hover {
    color: var(--terniq-primary);
    background-color: var(--terniq-gray-100);
    border: none;
}

.terniq-sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
    border: none;
}

/* Search Form */
.terniq-search-form {
    position: relative;
}

.terniq-search-input {
    background-color: var(--terniq-gray-50);
    border: 1px solid var(--terniq-gray-200);
    border-radius: 0.5rem 0 0 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 300px;
    transition: all 0.2s ease;
}

.terniq-search-input:focus {
    outline: none;
    border-color: var(--terniq-primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
    background-color: var(--terniq-white);
}

.terniq-search-btn {
    background-color: var(--terniq-primary);
    border: 1px solid var(--terniq-primary);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--terniq-white);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.terniq-search-btn:hover {
    background-color: var(--terniq-primary-hover);
    border-color: var(--terniq-primary-hover);
    color: var(--terniq-white);
}

/* Navigation Icons */
.terniq-nav-icon {
    color: var(--terniq-gray-600);
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
}

.terniq-nav-icon:hover {
    color: var(--terniq-primary);
    background-color: var(--terniq-gray-100);
    text-decoration: none;
}

.terniq-notification-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    font-weight: 600;
}

/* User Dropdown */
.terniq-user-dropdown {
    color: var(--terniq-gray-700);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.terniq-user-dropdown:hover {
    color: var(--terniq-gray-900);
    background-color: var(--terniq-gray-100);
    text-decoration: none;
}

.terniq-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--terniq-gray-200);
}

.terniq-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--terniq-gray-900);
    line-height: 1.2;
}

.terniq-user-role {
    font-size: 0.75rem;
    color: var(--terniq-gray-500);
    line-height: 1.2;
}

.terniq-user-chevron {
    font-size: 0.75rem;
    color: var(--terniq-gray-400);
    transition: transform 0.2s ease;
}

.dropdown.show .terniq-user-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.terniq-dropdown-menu {
    border: 1px solid var(--terniq-gray-200);
    border-radius: 0.5rem;
    box-shadow: var(--terniq-shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 200px;
}

.terniq-dropdown-item {
    color: var(--terniq-gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.terniq-dropdown-item:hover {
    color: var(--terniq-gray-900);
    background-color: var(--terniq-gray-100);
    text-decoration: none;
}

.terniq-dropdown-item.text-danger {
    color: var(--terniq-danger);
}

.terniq-dropdown-item.text-danger:hover {
    color: var(--terniq-danger);
    background-color: rgb(239 68 68 / 0.1);
}

/* Notification Items */
.terniq-notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.terniq-notification-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--terniq-gray-900);
}

/* Buttons */
.terniq-btn-primary {
    background-color: var(--terniq-primary);
    border-color: var(--terniq-primary);
    color: var(--terniq-white);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.terniq-btn-primary:hover {
    background-color: var(--terniq-primary-hover);
    border-color: var(--terniq-primary-hover);
    color: var(--terniq-white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--terniq-shadow-md);
}

.terniq-btn-outline {
    background-color: transparent;
    border: 1px solid var(--terniq-gray-300);
    color: var(--terniq-gray-700);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.terniq-btn-outline:hover {
    background-color: var(--terniq-gray-100);
    border-color: var(--terniq-gray-400);
    color: var(--terniq-gray-900);
    text-decoration: none;
}

/* User Info for Mobile */
.terniq-user-info {
    background-color: var(--terniq-gray-50);
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .terniq-navbar {
        padding: 0.75rem 1rem; /* Add horizontal padding on mobile */
    }
    
    .terniq-navbar-container {
        width: 95%; /* Almost full width on mobile */
        min-width: unset;
        padding: 0.5rem 1rem;
        border-radius: 0.75rem;
    }
    
    .terniq-navbar.navbar-scrolled .terniq-navbar-container {
        width: 90%; /* Still wide on mobile when scrolled */
        border-radius: 1rem;
        padding: 0.4rem 0.75rem;
    }
    
    .terniq-brand-text {
        font-size: 1.25rem;
    }
    
    .terniq-navbar.navbar-scrolled .terniq-brand-text {
        font-size: 1rem;
    }
    
    .terniq-user-dropdown {
        padding: 0.375rem;
    }
    
    /* Always hide user info on mobile */
    .terniq-user-info-desktop {
        display: none !important;
    }
    
    /* Always hide chevron on mobile */
    .terniq-user-chevron {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .terniq-navbar-container {
        width: 98%;
        padding: 0.4rem 0.75rem;
    }
    
    .terniq-navbar.navbar-scrolled .terniq-navbar-container {
        width: 95%;
        padding: 0.3rem 0.5rem;
    }
    
    .terniq-brand-text {
        font-size: 1.125rem;
    }
    
    .terniq-navbar.navbar-scrolled .terniq-brand-text {
        font-size: 0.95rem;
    }
    
    .terniq-logo {
        width: 24px;
        height: 24px;
    }
    
    .terniq-navbar.navbar-scrolled .terniq-logo {
        width: 20px;
        height: 20px;
    }
}

/* Override Bootstrap navbar defaults */
.terniq-navbar .navbar-nav .nav-link {
    color: var(--terniq-gray-600);
    padding: 0;
}

.terniq-navbar .navbar-nav .nav-link:hover {
    color: var(--terniq-primary);
}

/* Dropdown header styling */
.terniq-dropdown-menu .dropdown-header {
    color: var(--terniq-gray-900);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem 0.25rem;
}

/* Dropdown divider styling */
.terniq-dropdown-menu .dropdown-divider {
    border-color: var(--terniq-gray-200);
    margin: 0.5rem 0;
}

/* Focus states for accessibility */
.terniq-nav-icon:focus,
.terniq-user-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Animation for dropdown */
.terniq-dropdown-menu {
    animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification badge pulse animation */
.terniq-notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Logo hover effect */
.terniq-brand:hover .terniq-logo {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --terniq-white: #1e293b;
        --terniq-gray-50: #334155;
        --terniq-gray-100: #475569;
        --terniq-gray-200: #64748b;
        --terniq-gray-300: #94a3b8;
        --terniq-gray-500: #cbd5e1;
        --terniq-gray-600: #e2e8f0;
        --terniq-gray-700: #f1f5f9;
        --terniq-gray-800: #f8fafc;
        --terniq-gray-900: #ffffff;
    }
} 