/* Browser normalization for consistent rendering across Chrome, Edge, Firefox, etc. */
/* Note: Local font-face declarations are handled via Google Fonts fallback in index.html.
   Remove local @import to avoid 404s if font files are not present. */

html {
    font-size: 14px; /* Reduced from 16px */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Force consistent zoom behavior */
    zoom: 1;
}

:root { --base-font: "Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

html, body {
    font-family: var(--base-font);
    font-size: 14.5px; /* Reduced from 1rem */
    line-height: 1.4; /* Reduced from 1.5 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent browser-specific scaling */
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}/* Reset box-sizing for consistent spacing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Ensure consistent button and form element sizing */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

/* Hide number input spin buttons (up/down arrows) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Remove ugly blue border and add subtle shadow on focus */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-select:focus,
.form-check-input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Specific focus for buttons */
.btn:focus,
.btn:active:focus {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* Primary button focus */
.btn-primary:focus,
.btn-primary:active:focus {
    box-shadow: 0 2px 8px rgba(27, 110, 194, 0.25) !important;
}

/* Override Bootstrap's default blue focus ring */
.form-control:focus,
.form-select:focus {
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px 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;
    }

/* RTL rules for app-level components have been moved to css/rtl.css to avoid duplication. */

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5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0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Loading progress visuals removed from styles (handled via service or removed UI) */

code {
    color: #c02d76;
}

/* Global size reduction for all elements */
/* Buttons */
.btn {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.btn-lg {
    padding: 0.45rem 1rem !important;
    font-size: 0.9375rem !important;
}

/* Form controls */
.form-control, .form-select {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
}

.form-control-sm, .form-select-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.form-label {
    font-size: 0.8125rem !important;
    margin-bottom: 0.35rem !important;
}

/* Tables */
.table {
    font-size: 0.8125rem !important;
}

.table th,
.table td {
    padding: 0.5rem 0.5rem !important;
    line-height: 1.4 !important;
}

.table-sm th,
.table-sm td {
    padding: 0.35rem 0.35rem !important;
}

/* Headings */
h1 { font-size: 1.75rem !important; }
h2 { font-size: 1.5rem !important; }
h3 { font-size: 1.25rem !important; }
h4 { font-size: 1.1rem !important; }
h5 { font-size: 0.9375rem !important; }
h6 { font-size: 0.875rem !important; }

/* Cards */
.card {
    font-size: 0.8125rem !important;
}

.card-body {
    padding: 0.875rem !important;
}

.card-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}

/* Modal */
.modal-header {
    padding: 0.75rem 1rem !important;
}

.modal-body {
    padding: 0.875rem 1rem !important;
}

.modal-footer {
    padding: 0.625rem 1rem !important;
}

.modal-title {
    font-size: 1.15rem !important;
}

/* Badges */
.badge {
    font-size: 0.75rem !important;
    padding: 0.25em 0.5em !important;
}

/* Alerts */
.alert {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.8125rem !important;
}

/* Pagination */
.pagination {
    font-size: 0.8125rem !important;
}

.page-link {
    padding: 0.35rem 0.65rem !important;
}

/* Dropdowns */
.dropdown-item {
    padding: 0.35rem 1rem !important;
    font-size: 0.8125rem !important;
}

/* Input groups */
.input-group-text {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8125rem !important;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.8125rem !important;
}

.breadcrumb-item a:focus,
.breadcrumb-item a:focus-visible,
.breadcrumb-item a:active,
.breadcrumb-item:focus,
.breadcrumb-item:focus-visible,
.breadcrumb-item:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* List groups */
.list-group-item {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.8125rem !important;
}

/* Loading component variables and minimal helpers */
:root {
    --loading-primary: #1b6ec2;
    --loading-accent: #59a3ff;
    --loading-bg: rgba(0,0,0,0.06);
    --loading-track: rgba(0,0,0,0.06);
    --loading-foreground: #0b3b5a;
    --loading-height: 0.5rem;
    --loading-spinner-size: 1rem;
}

.ml-2 { margin-left: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* Ensure page content is a positioning context for the loading overlay */
.page-content { position: relative; }

/* Body scroll lock used when overlays are shown. Keeps body from scrolling and preserves scroll position. */
.hp-scroll-locked, .hp-scroll-locked body {
    overflow: hidden !important;
    touch-action: none !important;
}

/* Keep body visually at the same place when locked (body.top is set via JS). */
body.hp-scroll-locked {
    position: relative;
    width: 100%;
}

/* Remove all focus outlines globally for cleaner UI */
a:focus,
a:focus-visible,
a:active,
button:focus,
button:focus-visible,
button:active,
img:focus,
img:focus-visible,
.logo:focus,
.logo:focus-visible,
.logo:active,
.nav-link:focus,
.nav-link:focus-visible,
div[role="button"]:focus,
div[role="button"]:focus-visible,
div[role="button"]:active,
[role="button"]:focus,
[role="button"]:focus-visible,
[role="button"]:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

