html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2Ni4wNTQ3IDI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* Sidebar header: expand to fit logo + name */
.sidebar .top-row.navbar {
    height: auto;
    min-height: 3.5rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
    align-items: flex-start;
}

/* Keep the container within the sidebar and avoid any unexpected horizontal expansion */
.sidebar .top-row.navbar .container-fluid {
    max-width: 100%;
    padding-left: .75rem;
    padding-right: .75rem;
    box-sizing: border-box;
}

/* Brand text wrapping (avoid truncation) */
.sidebar .navbar-brand {
    white-space: normal;
    line-height: 1.2;
    margin-top: .25rem;
}

/* Logo sizing within the sidebar width - do NOT force full width */
.sidebar .brand-logo {
    display: block;
    max-width: 100%;   /* cap to sidebar width */
    width: auto;       /* don't stretch to container width */
    height: auto;
    max-height: 72px;  /* adjust if you want it taller/shorter */
    object-fit: contain;
}

/* Make the logout button look/align like other nav links in the sidebar */
.sidebar .nav-item form { margin: 0; }

.sidebar .nav-item form .btn.nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem 1rem; /* align with other nav links */
    background: transparent;
    border: 0;
    color: inherit;
}

/* Optional: same hover background as links */
.sidebar .nav-item form .btn.nav-link:hover,
.sidebar .nav-item form .btn.nav-link:focus {
    background-color: rgba(255, 255, 255, .1);
}

/* Keep the menu inside the purple sidebar and scroll if too tall */
.sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent content painting past the 100vh sidebar */
}

.sidebar .nav-scrollable {
    flex: 1 1 auto;   /* take remaining height under the header */
    overflow-y: auto; /* scroll within the sidebar */
    min-height: 0;    /* allow flex child to shrink for proper scrolling */
}

/* Sidebar nav links (anchors and the logout button) - white text + vertical centering */
.sidebar nav .nav-link,
.sidebar .nav-item form .btn.nav-link {
    color: #fff;              /* override the global .btn-link color */
    display: flex;            /* vertically center contents */
    align-items: center;
    gap: .5rem;               /* space between icon and text */
    line-height: 1.5;
}

/* Center the month selector inside the calendar */
.calendar .calendar-month {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* left spacer | title | right spacer */
    align-items: center;
    gap: .5rem;
}

.calendar .calendar-month .title {
    text-align: center;
}

.calendar .calendar-month .prev { justify-self: start; }
.calendar .calendar-month .next { justify-self: end; }

/* 7 equal columns for headers and days */
.calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .25rem; /* ~ Bootstrap g-1 */
}

/* Fixed height day boxes; scroll only the slots */
:root { --calendar-day-height: 180px; }

.calendar .calendar-days > div { display: flex; }
.calendar .calendar-days > div > .day-cell {
    display: flex;
    flex-direction: column;
    height: var(--calendar-day-height);
    width: 100%;
}

/* Highlight current day with light blue background */
.calendar .day-cell.bg-today {
    background-color: #bbdefb !important; /* Brighter light blue */
    border-color: #1976d2 !important; /* Blue border */
    border-width: 2px !important;
}

/* Grey out past days */
.calendar .day-cell.bg-past {
    background-color: #f5f5f5 !important; /* Light grey */
    opacity: 0.7;
}

/* Home day selector centered */
.day-selector {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .5rem;
}
.day-selector > div { text-align: center; }

/* Timeslot rows: grid of booking cards */
.slot-title {
    font-weight: 600;
    margin-bottom: .25rem;
}
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .5rem;
}
.booking-card {
    background: #fff;
}

/* Ensure long content (emails/addresses) wrap inside booking cards */
.booking-card {
    min-width: 0;                 /* allow grid item to shrink */
    overflow-wrap: anywhere;      /* modern wrap */
    word-break: break-word;       /* Safari/legacy fallback */
}

.booking-card a {
    overflow-wrap: anywhere;
    word-break: break-word;
}
