﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

a, .btn-link {
    color: #0066cc;
}

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    flex: 1;
}

.main .top-row {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.main .top-row > a, .main .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.main .top-row > a:hover, .main .top-row .btn-link:hover {
    text-decoration: underline;
}

.sidebar {
    background: linear-gradient(180deg, #1e3a8a 0%, #3730a3 70%);
}

.sidebar .top-row {
    background-color: rgba(0,0,0,0.4);
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.sidebar .navbar-brand {
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
}

.sidebar .navbar-brand:hover {
    color: #e5e7eb;
}

.sidebar .bi {
    width: 1.5rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    margin-right: 0.5rem;
}

.sidebar .nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.sidebar .nav-item:first-of-type {
    padding-top: 1rem;
}

.sidebar .nav-item:last-of-type {
    padding-bottom: 1rem;
}

.sidebar .nav-item a {
    color: #d1d5db;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    text-decoration: none;
}

.sidebar .nav-item a.active {
    background-color: rgba(255,255,255,0.25);
    color: white;
}

.sidebar .nav-item a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #198754;
}

.invalid {
    outline: 1px solid #dc3545;
}

.validation-message {
    color: #dc3545;
}

#blazor-error-ui {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
}

/* Responsive design */
@media (max-width: 767.98px) {
    .page {
        flex-direction: column;
    }
    
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
}

@media (min-width: 768px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .main > article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        display: block;
    }
}

/* Custom styles for better visual hierarchy */
.badge {
    font-size: 0.75em;
}

.diff-container {
    margin: 1rem 0;
}

/* Loading states */
.min-vh-100 {
    min-height: 100vh;
}

/* Custom loading spinner - more subtle than Bootstrap default */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: gentle-spin 1.5s linear infinite;
    display: inline-block;
}

.loading-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes gentle-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading overlay for diff content */
.diff-loading-overlay {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    flex-direction: column;
    gap: 16px;
    color: #6c757d;
}

.diff-loading-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

.diff-loading-content h5 {
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
}

.diff-loading-content small {
    color: #6c757d;
    line-height: 1.4;
}

/* Pulse animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Improved button styles */
.btn-outline-secondary {
    --bs-btn-color: #6c757d;
    --bs-btn-border-color: #6c757d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6c757d;
    --bs-btn-hover-border-color: #6c757d;
}
