/* ==========================================================================
   Lantisnet Design Tokens
   Modern CSS custom properties for consistent theming across all facilities.
   Load AFTER bootstrap.css, BEFORE styles.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BORDER RADIUS TOKENS
   -------------------------------------------------------------------------- */
:root {
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   2. FACILITY-TYPE COLOR PALETTES
   Each facility type sets its own primary/accent colors.
   Default palette (SNF) is defined in :root; facility-specific palettes
   are applied via body classes set by SetupWEB.vb (e.g. body.fac-alf).
   -------------------------------------------------------------------------- */
:root {
    /* Default / SNF palette */
    --color-primary: #527292;
    --color-primary-light: #6a8fb3;
    --color-primary-dark: #3d5670;
    --color-accent: #6b7f8e;
    --color-accent-light: #8a9daa;
    --color-accent-dark: #567080;

    /* Neutrals */
    --color-bg: #ffffff;
    --color-bg-subtle: #f8f9fa;
    --color-bg-muted: #f2eee9;
    --color-surface: #ffffff;
    --color-border: #dee2e6;
    --color-border-light: #e9ecef;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-text-inverse: #ffffff;

    /* Footer */
    --color-footer-bg: #2c3e50;
    --color-footer-text: #ffffff;
    --color-footer-link: #8a9daa;
    --color-footer-border: rgba(255, 255, 255, 0.15);
}

/* ALF - Assisted Living Facility (WEL-Life) */
body.fac-alf {
    --color-primary: #4a7c59;
    --color-primary-light: #6a9e78;
    --color-primary-dark: #365c42;
    --color-accent: #d4a843;
    --color-accent-light: #e0c06d;
    --color-accent-dark: #a88530;
    --color-footer-bg: #2d4a35;
}

/* SNF - Skilled Nursing Facility */
body.fac-snf {
    --color-primary: #527292;
    --color-primary-light: #6a8fb3;
    --color-primary-dark: #3d5670;
    --color-accent: #6b7f8e;
    --color-accent-light: #8a9daa;
    --color-accent-dark: #567080;
    --color-footer-bg: #2c3e50;
}

/* HH - Home Health */
body.fac-hh {
    --color-primary: #5b7a8a;
    --color-primary-light: #7a9cad;
    --color-primary-dark: #435a67;
    --color-accent: #e07b4f;
    --color-accent-light: #e99b78;
    --color-accent-dark: #b5603c;
    --color-footer-bg: #34495e;
}

/* HO - Home Office / Corporate */
body.fac-ho {
    --color-primary: #4a4a6a;
    --color-primary-light: #62619a;
    --color-primary-dark: #36364f;
    --color-accent: #c0392b;
    --color-accent-light: #d65548;
    --color-accent-dark: #962d22;
    --color-footer-bg: #2c2c3e;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY TOKENS
   -------------------------------------------------------------------------- */
:root {
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: var(--font-family-base);

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-base: 1.5;
    --line-height-relaxed: 1.75;
}

/* --------------------------------------------------------------------------
   4. SPACING TOKENS
   -------------------------------------------------------------------------- */
:root {
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

/* --------------------------------------------------------------------------
   5. SHADOW TOKENS
   -------------------------------------------------------------------------- */
:root {
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   6. TRANSITION TOKENS
   -------------------------------------------------------------------------- */
:root {
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ==========================================================================
   7. GLOBAL ROUNDED CORNERS — Bootstrap 5 component overrides
   Applied after Bootstrap loads so these take precedence.
   ========================================================================== */

/* Buttons */
.btn {
    border-radius: var(--radius-md);
}

.btn-sm {
    border-radius: var(--radius-sm);
}

.btn-lg {
    border-radius: var(--radius-lg);
}

.btn-pill {
    border-radius: var(--radius-full);
}

/* Cards */
.card {
    border-radius: var(--radius-lg);
}

.card-header:first-child {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.card-footer:last-child {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.card-img-top {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.card-img-bottom {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Form controls */
.form-control,
.form-select {
    border-radius: var(--radius-md);
}

.form-control-sm {
    border-radius: var(--radius-sm);
}

.form-control-lg {
    border-radius: var(--radius-lg);
}

/* Input groups */
.input-group > .form-control:first-child,
.input-group > .input-group-text:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.input-group > .form-control:last-child,
.input-group > .input-group-text:last-child,
.input-group > .btn:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Dropdowns */
.dropdown-menu {
    border-radius: var(--radius-lg);
}

.dropdown-item:first-child {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.dropdown-item:last-child {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Modals */
.modal-content {
    border-radius: var(--radius-xl);
}

.modal-header {
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}

.modal-footer {
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
}

/* Badges */
.badge {
    border-radius: var(--radius-sm);
}

.badge.rounded-pill {
    border-radius: var(--radius-full);
}

/* Toasts */
.toast {
    border-radius: var(--radius-lg);
}

/* Popovers & Tooltips */
.popover {
    border-radius: var(--radius-lg);
}

.tooltip-inner {
    border-radius: var(--radius-sm);
}

/* Nav tabs & pills */
.nav-tabs .nav-link {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.nav-pills .nav-link {
    border-radius: var(--radius-full);
}

/* Pagination */
.page-link:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.page-link:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Tables */
.table-responsive {
    border-radius: var(--radius-md);
}

/* Accordion */
.accordion-item:first-of-type {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.accordion-item:last-of-type {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Progress bars */
.progress {
    border-radius: var(--radius-full);
}

/* Breadcrumbs */
.breadcrumb {
    border-radius: var(--radius-md);
}

/* List groups */
.list-group {
    border-radius: var(--radius-md);
}

.list-group-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* ==========================================================================
   8. GLOBAL ROUNDED CORNERS — Legacy / custom component overrides
   ========================================================================== */

/* Popups */
.popup {
    border-radius: var(--radius-lg);
}

/* Content images (not icons, not logos) */
#MainContent img:not(.icon):not(.Logo):not([width="25"]):not([width="28"]) {
    border-radius: var(--radius-md);
}

/* ASP.NET panels rendered as divs */
.aspNetPanel,
[id$="Panel"] > div {
    border-radius: var(--radius-md);
}

/* Legacy button styles */
.big-button,
.small-button {
    border-radius: var(--radius-md);
}

/* Feature blocks */
.features {
    border-radius: var(--radius-md);
}

/* Blurb headings */
h2#blurb {
    border-radius: var(--radius-md);
}

/* ASP.NET GridView / DataGrid */
.GridViewTable,
.aspnet-gridview {
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Owl Carousel */
.owl-carousel .owl-item img {
    border-radius: var(--radius-md);
}

.owl-carousel .owl-nav button,
.owl-carousel .owl-dots .owl-dot {
    border-radius: var(--radius-full);
}

/* Generic textareas and selects */
textarea,
select {
    border-radius: var(--radius-md);
}

/* ASP.NET TextBox / DropDownList rendered elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"] {
    border-radius: var(--radius-md);
}
