/* VCare LIMS - Single Professional Theme */

:root {
    /* Primary Colors - Professional Blue/Purple */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c8ef5;
    
    /* Semantic Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --secondary-color: #64748b;
    
    /* Backgrounds */
    --bg-main: linear-gradient(135deg, rgb(245, 247, 250) 0%, rgb(195, 207, 226) 100%);
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    
    /* Text Colors */
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Sidebar - Modern Dark Gradient */
    --sidebar-bg: linear-gradient(180deg, #1a1f3a 0%, #2d1b4e 50%, #1a1f3a 100%);
    --sidebar-hover: rgba(102, 126, 234, 0.15);
    --sidebar-active: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    height: 100%;
    margin: 0;
    font-size: 16px; /* Increased from 15px */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* Prevent body scroll */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    padding: 0.375rem 1rem; /* Reduced from 0.5rem 1.25rem */
    border-radius: 4px; /* Reduced from 6px */
    font-weight: 500;
    font-size: 0.875rem; /* Reduced from 0.9375rem */
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem; /* Reduced from 0.5rem */
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-lighter);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Button sizes */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
}

/* Content */
.content {
    padding-top: 0.5rem;
    min-height: calc(100vh - 3.5rem);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.125rem; font-weight: 700; } /* Increased from 2rem */
h2 { font-size: 1.625rem; } /* Increased from 1.5rem */
h3 { font-size: 1.375rem; } /* Increased from 1.25rem */
h4 { font-size: 1.125rem; } /* Increased from 1rem */
h5 { font-size: 1rem; } /* Increased from 0.875rem */
h6 { font-size: 0.9375rem; } /* Increased from 0.875rem */

/* Cards */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem; /* Increased from default */
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* Forms */
.form-control, .form-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 0.9375rem; /* Increased from 0.875rem */
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9375rem; /* Increased from 0.875rem */
    margin-bottom: 0.5rem;
}

.invalid {
    border-color: var(--danger-color);
}

.validation-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg-lighter);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.875rem; /* Increased from 0.75rem */
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table tbody td {
    padding: 0.75rem;
    font-size: 0.9375rem; /* Increased from 0.875rem */
    color: var(--text-medium);
}

/* Badges */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8125rem; /* Increased from 0.75rem */
}

.badge-primary { background: var(--primary-color); color: white; }
.badge-success { background: var(--success-color); color: white; }
.badge-warning { background: var(--warning-color); color: white; }
.badge-danger { background: var(--danger-color); color: white; }
.badge-info { background: var(--info-color); color: white; }

/* Loading Spinner */
.loading-spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }

.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-light); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Blazor Error UI */
/*#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    padding: 0.75rem 1rem;
    z-index: 10000;
    text-align: center;
    font-size: 0.9375rem;*/ /* Increased from 0.875rem */
/*}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: white;
    cursor: pointer;
    margin-left: 1rem;
}

#blazor-error-ui .reload:hover,
#blazor-error-ui .dismiss:hover {
    opacity: 0.8;
}*/

/* Custom Toastr Styles - Modern Flat Design */
.success-toast-override {
    background: #ffffff;
    color: #155724;
    border-radius: 8px;
    border-top: 4px solid #28a745;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-toast-override {
    background: #ffffff;
    color: #721c24;
    border-radius: 8px;
    border-top: 4px solid #dc3545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-toast-override {
    background: #ffffff;
    color: #004085;
    border-radius: 8px;
    border-top: 4px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warning-toast-override {
    background: #ffffff;
    color: #856404;
    border-radius: 8px;
    border-top: 4px solid #ffc107;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Icon styling - Add icons before the message */
.success-toast-override::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.error-toast-override::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #dc3545;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-toast-override::before {
    content: 'i';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    font-style: italic;
    flex-shrink: 0;
}

.warning-toast-override::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffc107;
    color: #212529;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Toast message styling */
.blazored-toast-message {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    word-wrap: break-word;
    max-width: 100%;
    flex: 1;
}

/* Toast title styling */
.blazored-toast-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

/* Close button styling - circular with light background */
.blazored-toast-close-button {
    background: #f0f0f0;
    color: #6c757d;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
}

    .blazored-toast-close-button:hover {
        background: #e0e0e0;
        color: #495057;
        transform: scale(1.1);
    }

/* Icon styling (if using icons instead of pseudo-elements) */
.blazored-toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.blazored-toast-container {
    z-index: 9999 !important;
}

.blazored-toast {
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
    max-width: 450px;
    margin-bottom: 0.75rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Progress bar styling - subtle and modern */
.blazored-toast-progress {
    background-color: rgba(0, 0, 0, 0.1);
    height: 3px;
    border-radius: 0 0 8px 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Success progress bar */
.success-toast-override .blazored-toast-progress {
    background-color: #28a745;
}

/* Error progress bar */
.error-toast-override .blazored-toast-progress {
    background-color: #dc3545;
}

/* Info progress bar */
.info-toast-override .blazored-toast-progress {
    background-color: #007bff;
}

/* Warning progress bar */
.warning-toast-override .blazored-toast-progress {
    background-color: #ffc107;
}

/* Remove any text shadows for clean look */
.blazored-toast * {
    text-shadow: none !important;
}

/* =====================================================================
   Rich Text Editor font-family / font-size dropdown popups
   ---------------------------------------------------------------------
   The RTE offers ~48 font families, so the dropdown list is taller than
   the screen and overflows. These popups render at document.body level
   (outside the editor's wrapper), so this rule must be GLOBAL. Cap the
   height and let the list scroll. Scoped to .e-rte-dropdown-popup so
   other (non-RTE) dropdowns in the app are unaffected.
   ===================================================================== */
.e-rte-dropdown-popup {
    max-height: 340px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.e-rte-dropdown-popup .e-dropdown-menu,
.e-rte-dropdown-popup ul {
    max-height: 320px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Keep each font row compact so more options are visible at once */
.e-rte-dropdown-popup .e-item,
.e-rte-dropdown-popup li {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.3 !important;
}




/* FocusOnNavigate (Routes.razor) focuses the page's first h1 after each navigation
   so screen readers announce the page; hide the browser outline it would draw. */
h1:focus,
h1:focus-visible {
    outline: none;
}
