﻿:root {
    --primary-color: #55008a;
    --custom-background-color: #f4e8fa;
    --tab-active-background-color: #cbafde;
}

.login-layout-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-main {
    flex: 1 1 auto;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

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

    .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;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSA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A5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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 {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

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

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            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: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

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

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

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


/* Custom style for the resolver and tenant landing page header background color */
.tenant-header {
    background-color: var(--primary-color) !important;
    color: #fff !important; /* make text white */
}

/* Used by tenant landing pages */
#bookingContainer {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Custom CSS for pastel shading */
.custom-background-color {
    background-color: var(--custom-background-color);
}
/* Custom CSS for reduced label size */
.text-small,
.text-small-highlighted-orange,
.text-small-highlighted-indigo {
    font-size: 0.875em;
}

.text-small-highlighted-orange {
    background-color: #ff8c00;
    color: #ffffff;
}

.text-small-highlighted-indigo {
    background-color: #4b0082;
    color: #ffffff;
}


/* Custom CSS for calculated font weight */
.text-dark {
    font-weight: calc(var(--bs-body-font-weight) * 1.4) !important; /* Adjust the multiplier as needed */
}

.required::after {
    content: " *";
    color: red;
}

/* CSS for Signature Pad */
signature-pad-container {
    max-width: 600px;
    margin: 0;
    padding: 0;
    border: none;
}

.signature-invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

.signature-pad {
    margin: 0;
    cursor: url(/icons/pen.png) 1 25, pointer;
    border: 1px solid #000;
    border-radius: 4px;
}

.typed-signature {
    font-family: "Brush Script MT", "Lucida Handwriting", cursive; /* Handwriting-style system fonts */
    font-size: 32px; /* Larger font size for a signature appearance */
    color: #2a2a2a; /* Dark gray ink-like color */
    padding: 10px; /* Padding for spacing inside the box */
    width: 100%; /* Full width for alignment */
    height: 60px; /* Height to make the box spacious */
    background-color: #f9f9f9; /* Light gray background */
    outline: none; /* Remove focus outline */
    text-align: left; /* Ensure text remains left-aligned */
    box-sizing: border-box; /* Ensure padding doesn’t affect height/width */
}


.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.navigation-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

    .navigation-button:hover {
        background-color: #34495e;
    }

.icon-container {
    display: flex;
    align-items: flex-start;
}

.double-booked-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
}

.rect-icon {
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    background-color: #886308;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px; /* Make the text smaller */
    color: white;
}

    .rect-icon img {
        margin-right: 10px;
        width: 16px; /* Icon width */
        height: 16px; /* Icon height */
    }

.btn-icon {
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 7px;
    padding-bottom: 7px;
    color: #fff;
    background-color: var(--primary-color);
    border-color: #228A94;
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s; /* Add smooth transition */
}

    .btn-icon img {
        margin-right: 10px;
        width: 24px; /* Icon width */
        height: 24px; /* Icon height */
    }

    /* Hover state */
    .btn-icon:hover {
        background-color: #007bff; /* Blue color similar to .btn-primary */
        border-color: #007bff;
    }

    /* Focus state */
    .btn-icon:focus {
        background-color: #0056b3; /* Darker blue color */
        border-color: #0056b3;
    }

    /* Active state */
    .btn-icon:active {
        background-color: #004085; /* Even darker blue color */
        border-color: #004085;
    }

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: #228A94;
}

    /* Force disabled primary buttons to use clinic branding */
    .btn-primary:disabled,
    .btn-primary[disabled],
    fieldset:disabled .btn-primary {
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        color: #fff !important;
        opacity: 0.65; /* keeps it looking disabled but still branded */
    }

    /* Hover, focus, active use the custom background */
    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary:not(:disabled):not(.disabled):hover,
    .btn-primary:not(:disabled):not(.disabled):active {
        background-color: var(--custom-background-color) !important;
        border-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
    }

/* Base outline primary */
/* Base outline primary */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

    /* Hover, focus, active — becomes solid */
    .btn-outline-primary:hover,
    .btn-outline-primary:focus,
    .btn-outline-primary:active,
    .btn-outline-primary:not(:disabled):not(.disabled):hover,
    .btn-outline-primary:not(:disabled):not(.disabled):active {
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        color: #fff !important;
    }

    /* Disabled outline primary */
    .btn-outline-primary:disabled,
    .btn-outline-primary[disabled],
    fieldset:disabled .btn-outline-primary {
        background-color: transparent !important;
        border-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
        opacity: 0.65;
    }


/* Custom style for the resolver background color */
.tenant-header {
    background-color: var(--primary-color) !important;
    color: #fff !important; /* make text white */
}
/* Custom style for the navbar background color */
nav.navbar.navbar-custom {
    background-color: var(--primary-color) !important;
}

/* Full-page overlay shown while state is loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    z-index: 9999;
}

/* Pulse loader */
.loading-pulse {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color); /* uses global theme */
    animation: layout-pulse 1s infinite alternate;
    margin-bottom: 12px;
}

@keyframes layout-pulse {
    from {
        transform: scale(0.7);
        opacity: 0.5;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Loading text */
.loading-text {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 0.05em;
}

.form-check-input {
    border-color: #555 !important;
    width: 1.1rem;
    height: 1.1rem;
}

    .form-check-input:checked {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
    }

/* --- GLOBAL LAYOUT FIX FOR RESPONSIVE INTERNAL SCROLLING ON DESKTOP and PAGE SCROLLING ON MOBILE --- */
/* MOBILE — Drawer Mode */
@media (max-width: 768px) {

    /* Let the PAGE scroll normally */
    body {
        overflow: auto !important;
    }

    /* Disable fixed-height SPA chain on mobile */
    #app,
    .layout-root,
    .layout-main {
        height: auto !important;
        min-height: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Drawer container — sits BELOW navbar, same colour */
    .mobile-drawer {
        position: fixed;
        top: 85px;
        left: 0;
        width: 260px;
        height: calc(100vh - 85px);
        background-color: var(--primary-color) !important;
        color: rgba(255,255,255,0.55); /* match navbar-dark inactive */
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        z-index: 2000;
    }

        .mobile-drawer.open {
            transform: translateX(0);
        }

    /* Drawer nav content */
    .drawer-nav {
        padding: 0.5rem 0;
    }

    /* === MATCH DESKTOP NAV-LINK EXACTLY === */
    .mobile-drawer .drawer-link {
        display: flex;
        align-items: center;
        padding: 0.65rem 1rem; /* desktop spacing */
        background-color: transparent; /* desktop default */
        color: rgba(255,255,255,0.55) !important; /* inactive */
        font-size: 1rem;
        text-decoration: none; /* desktop behaviour */
        white-space: nowrap;
    }

        /* Icon spacing — same as desktop */
        .mobile-drawer .drawer-link .oi {
            margin-right: 0.5rem;
            font-size: 1rem;
        }

        /* === ACTIVE — EXACT DESKTOP BEHAVIOUR === */
        .mobile-drawer .drawer-link.active {
            background-color: rgba(255,255,255,0.15);
            font-weight: 600;
            color: #ffffff;
        }

        /* === HOVER — EXACT DESKTOP BEHAVIOUR === */
        .mobile-drawer .drawer-link:hover {
            background-color: rgba(255,255,255,0.10);
            color: rgba(255,255,255,0.75) !important; /* hover */
        }

    /* Optional separators (desktop has none, but drawer needs structure) */
    .mobile-drawer .drawer-item {
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    /* Backdrop */
    .drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1500;
    }

    /* Toggler always visible on mobile */
    .navbar-toggler {
        display: block !important;
    }

    /* MOBILE — brand + toggler on one line */
    .navmenu-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide desktop menu on mobile */
    .navbar-collapse {
        display: none !important;
    }
}


/* DESKTOP */
@media (min-width: 769px) {
    /* The container that holds the UL and version text */
    .navbar-collapse {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* The UL itself must never wrap */
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
        .navbar-nav .nav-link {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

        /* Each menu item must stay inline */
        .navbar-nav .nav-item {
            white-space: nowrap !important;
            flex: 0 0 auto !important;
        }

    /* Root viewport */
    html, body {
        height: 100% !important;
        min-height: 0 !important;
    }

    /* Body is the viewport owner */
    body {
        display: flex;
        flex-direction: column;
        overflow: hidden; /* desktop only */
    }

    /* Blazor app root */
    #app {
        height: 100%; /* ⭐ REQUIRED */
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

        /* Force Blazor wrapper + comment siblings to stretch */
        #app > * {
            flex: 1 1 auto;
            min-height: 0;
        }

    /* Layout root (MainLayout wrapper) */
    .layout-root {
        height: 100%; /* ⭐ REQUIRED */
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

        .layout-root > * {
            flex: 1 1 auto;
            min-height: 0;
        }

    /* Main content area below NavMenu */
    .layout-main {
        height: 100%; /* ⭐ REQUIRED — THIS FIXES THE 1165px COLLAPSE */
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

        /* Force the component root inside layout-main to stretch */
        .layout-main > * {
            flex: 1 1 auto;
            min-height: 0;
        }

    /* --- FINAL HEIGHT CHAIN ENFORCER --- */
    /* Allow flex parents to grow instead of clipping children */
    #app, .layout-root, .layout-main {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }

    /* Desktop navbar layout */
    .navmenu-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        padding-left: 1rem;
        padding-right: 1rem;
        align-items: center;
    }

    /* Prevent UL from wrapping */
    .navbar-nav {
        flex-wrap: nowrap !important;
    }
}


/* Prevent Blazor boot spinner from stretching */
/* Your working fix — unchanged */
#app > .loading,
#app > .loading-progress,
#app > .blazor-error-ui {
    flex: 0 0 auto !important;
    min-height: auto !important;
}

/* FORCE override of inline SVG stroke */
#app svg circle {
    stroke: var(--primary-color) !important;
}

/* Colour the “100%” text */
#app .progress-text {
    color: var(--primary-color) !important;
}


/* 
   ============================================================
   HORIZONTAL SCROLLING TABS — GLOBAL OVERRIDE FOR BOOTSTRAP
   ============================================================
   IMPORTANT:
   - This MUST be in a GLOBAL CSS file (NOT a .razor.css file)
   - Blazor scoped CSS cannot override Bootstrap's global `.nav`
   - Bootstrap applies `flex-wrap: wrap` via `.nav`, not `.nav-tabs`
   - Therefore we override `.nav` on THIS SPECIFIC element only
*/

/* 
   1. Override Bootstrap's `.nav { flex-wrap: wrap }`
      We target the UL by ID + class to beat Bootstrap's selector.
      This is the critical rule that stops tab wrapping.
*/
#nav-tabs-container.nav {
    flex-wrap: nowrap !important; /* FORCE single-row tabs */
}

/* 
   2. Prevent tab items from shrinking.
      Bootstrap defaults to `flex: 0 1 auto`, which allows shrinking.
      Shrinking prevents overflow, which prevents scrolling.
*/
#nav-tabs-container .nav-item {
    flex: 0 0 auto !important; /* KEEP natural width */
}

/* 
   3. Prevent tab text from wrapping onto multiple lines.
      Without this, labels wrap even if the tabs themselves don't.
*/
#nav-tabs-container .nav-link {
    white-space: nowrap !important; /* KEEP text on one line */
    display: inline-flex; /* Keep padding + text together */
    width: auto !important; /* Guard against width:100% */
}

/* 
   4. Enable horizontal scrolling on the parent container.
      The UL itself should not scroll — the parent should.
      This ensures consistent behaviour across browsers.
*/
#nav-container {
    overflow-x: auto !important; /* ENABLE horizontal scroll */
    overflow-y: hidden; /* PREVENT vertical expansion */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    white-space: nowrap; /* Prevent inline wrapping */
}

