/* TextLy - Main Styles */
/* Custom styles that don't conflict with Bootstrap */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --sidebar-width: 260px;
}

/* CRITICAL: Add padding for fixed footer (from Footer.razor component) */
body {
    padding-bottom: 60px;
}

/* Layout Structure - Unique to Blazor */
.page {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-row {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem 0;
}

.logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.logo a {
    text-decoration: none;
    color: var(--text-primary);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.main-nav {
    flex: 1;
    padding: 0 0.75rem;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.nav-section a {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-section a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.nav-section a.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.nav-section a .icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.nav-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* Language Switcher - Custom component */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.language-switcher button:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.language-switcher button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

/* User Info - Custom component */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.btn-logout {
    color: var(--danger-color);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Loading Spinner - Custom */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Blazor Error UI - Hidden by default, shown when error occurs */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
    }

    .top-row {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem;
    }

    .language-switcher {
        width: 100%;
        margin-top: 0.5rem;
    }
}
