/* PECS Application Styles - HCA Healthcare Branding */
/* Complements neutron-theme.css */

/* 
 * MudDateRangePicker / MudDatePicker — outlined variant notch fix
 */
.mud-picker .mud-input-label-outlined {
    background-color: var(--mud-palette-surface);
    padding: 0 4px;
    margin-left: -4px;
}

html, body {
    font-family: 'HCA Mark', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:focus {
    outline: none;
}

/* Link Styles - HCA Blue */
a, .btn-link {
    color: rgb(0, 119, 181);
    text-decoration: none;
    transition: color 0.25s;
}

a:hover, .btn-link:hover {
    color: rgb(0, 90, 141);
    text-decoration: underline;
}

/* Primary Button - HCA Blue */
.btn-primary {
    color: #fff;
    background-color: rgb(0, 119, 181);
    border-color: rgb(0, 90, 141);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s;
}

.btn-primary:hover {
    background-color: rgb(0, 90, 141);
    border-color: rgb(0, 60, 107);
    box-shadow: 0px 5px 8px 0px rgba(0, 0, 0, 0.13);
}

/* Focus Styles */
.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 rgb(24, 142, 211);
}

.content {
    padding-top: 1.1rem;
}

/* Form Validation - HCA Colors */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid rgb(84, 148, 40);
    outline-offset: 2px;
}

.invalid {
    outline: 2px solid rgb(202, 74, 90);
    outline-offset: 2px;
}

.validation-message {
    color: rgb(202, 74, 90);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Blazor Error UI - HCA Red */
#blazor-error-ui {
    color-scheme: light only;
    background: rgb(248, 215, 218);
    color: rgb(134, 32, 48);
    border-top: 3px solid rgb(202, 74, 90);
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 9999999;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(134, 32, 48);
}

#blazor-error-ui .dismiss:hover {
    color: rgb(95, 18, 30);
}

/* Error Boundary - HCA Red */
.blazor-error-boundary {
    background: rgb(202, 74, 90);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 8px;
    margin: 1rem;
    position: relative;
}

.blazor-error-boundary::before {
    content: "?";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

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

/* Loading Progress - HCA Blue */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgb(226, 226, 226);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: rgb(24, 142, 211);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    color: rgb(0, 119, 181);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Code Highlighting */
code {
    color: rgb(140, 151, 232);
    background-color: rgb(246, 246, 250);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Noto Sans Mono', 'Courier New', Courier, monospace;
    font-size: 0.875em;
}

/* Form Floating Labels */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
    color: rgb(155, 155, 155);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Custom Scrollbar - HCA Theme */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgb(246, 246, 246);
}

::-webkit-scrollbar-thumb {
    background: rgb(176, 176, 176);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(133, 133, 133);
}

/* Accessibility - Focus Visible */
*:focus-visible {
    outline: 2px solid rgb(24, 142, 211);
    outline-offset: 2px;
}

/* Prepopulated (Read-Only) Fields - Visual Indicator */
.mud-input-control.prepopulated-field .mud-input-root {
    background-color: #f5f5f5 !important;
}

.mud-input-control.prepopulated-field .mud-input-root input,
.mud-input-control.prepopulated-field .mud-input-root textarea {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed;
}

.mud-input-control.prepopulated-field .mud-input-root fieldset {
    border-color: #d0d0d0 !important;
}

.mud-select.prepopulated-field .mud-input-root {
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
}

.mud-select.prepopulated-field .mud-select-input {
    color: #666 !important;
}

/* Print Styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        border-width: 2px;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}