html, body {
    font-family: 'Inter', sans-serif;
}

/* Accessibility & RTL (Phase 6f) */

/* WCAG 2.4.1 — skip link, visible only on keyboard focus */
.vrh-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 10px 16px;
    background: #1d4ed8;
    color: #ffffff !important;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    text-decoration: none;
}

.vrh-skip-link:focus {
    left: 0;
}

/* WCAG 2.4.7 — always-visible keyboard focus indicator */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* RTL: mirror text alignment for right-to-left cultures (Arabic). */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

a, .btn-link {
    color: #006bb7;
}

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

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.bkg-gradient {
    background: var(--gradient, linear-gradient(91deg, #00ADDC 1.61%, #00A650 100%));
}

.table-fixed-header {
    border-radius: 5px;
}

.table > :not(:last-child) > :last-child > * {
    background: #003665;
    color: white;
}

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

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@font-face {
    font-family: 'Inter';
    src: url('/content/fonts/Inter.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


.tag {
    color: #fff;
    padding: 4px 8px;
    border-radius: 11px;
    margin: 3px;
    display: inline-block;
    align-items: center;
    cursor: pointer;
}

table td {
    vertical-align: middle;
    align-items: center;
    align-content: center;
}

/* QuillJS custom css (Blazorise component doesn't work well atm */
.ql-size-small {
    font-size: 0.75rem;
}

.ql-size-large {
    font-size: 1.5rem;
}

.ql-size-huge {
    font-size: 2.5rem;
}

li[data-list="bullet"] {
    list-style-type: disc;
}

.badge-position {
    position: absolute;
    top: -3px;
    right: 0px;
    font-size: 0.6rem;
}

/* Hypermobility Body Diagram Styles */
.body-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.body-diagram {
    max-width: 200px;
    height: auto;
}

.body-diagram .body-part {
    fill: #e0e0e0;
    stroke: #9e9e9e;
    stroke-width: 1;
    transition: fill 0.3s ease;
}

.body-diagram .body-part.affected {
    fill: #4caf50;
    stroke: #2e7d32;
}

.body-diagram-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.body-diagram-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.body-diagram-legend .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #9e9e9e;
}

.body-diagram-legend .legend-color.not-affected {
    background-color: #e0e0e0;
}

.body-diagram-legend .legend-color.affected {
    background-color: #4caf50;
}

.body-diagram .side-label {
    font-size: 14px;
    font-weight: bold;
    fill: #666;
}

/* ============================================
   VIDEOREHA BRANDED LOADING INDICATOR
   Overrides Blazorise LoadingIndicator styles
   ============================================ */

/* Main loading overlay background */
.b-loading-indicator {
    background: rgba(248, 250, 252, 0.92) !important;
    backdrop-filter: blur(3px);
}

/* Spinner container */
.b-loading-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 48px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Hide the default Blazorise logo spinner */
.b-loading-indicator-content svg {
    display: none !important;
}

/* Create custom Videoreha spinner using pseudo-element */
.b-loading-indicator-content::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #00ADDC;
    border-right-color: #00A650;
    border-radius: 50%;
    animation: vrh-loading-spin 0.9s linear infinite;
}

/* Add Videoreha branding text */
.b-loading-indicator-content::after {
    content: 'Loading...';
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.02em;
}

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

/* For full-screen loading indicators */
.b-loading-indicator.b-loading-indicator-fullscreen {
    z-index: 9999;
}

/* Compact version for smaller containers */
.b-loading-indicator:not(.b-loading-indicator-fullscreen) .b-loading-indicator-content {
    padding: 24px 32px;
}

.b-loading-indicator:not(.b-loading-indicator-fullscreen) .b-loading-indicator-content::before {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.b-loading-indicator:not(.b-loading-indicator-fullscreen) .b-loading-indicator-content::after {
    font-size: 0.8rem;
}

/* App-owned LoadingIndicator (Blazorise.LoadingIndicator drop-in; see Components/Utilities/LoadingIndicator.razor) */
.vrh-loading-host { position: relative; }
.vrh-loading-overlay { display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.70); }

/* App-owned drag & drop (VRHDropContainer/VRHDropZone) */
.vrh-drop-item[draggable="true"] {
    cursor: grab;
}
