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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.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;
}

.lesson-calendar {
    display: grid;
    grid-template-columns: 60px repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
    border-top: 1px solid var(--mud-palette-lines-default);
    border-left: 1px solid var(--mud-palette-lines-default);
}

    .lesson-calendar.lesson-calendar-day {
        grid-template-columns: 60px 1fr;
    }

.calendar-time-column {
    min-width: 60px;
}

.calendar-day-column {
    min-width: 120px;
    border-right: 1px solid var(--mud-palette-lines-default);
}

.calendar-header-spacer {
    height: 55px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.calendar-day-header {
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .calendar-day-header.today {
        font-weight: 600;
    }

.calendar-time {
    height: 70px;
    padding: 5px;
    text-align: right;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-right: 1px solid var(--mud-palette-lines-default);
}

.calendar-slot {
    position: relative;
    height: 70px;
    padding: 2px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
}

    .calendar-slot:hover {
        background: rgba(0, 0, 0, 0.02);
    }

.lesson-card {
    position: relative;
    z-index: 2;
    margin: 2px;
    padding: 5px 7px;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    min-height: 60px;
}

    .lesson-card:hover {
        filter: brightness(0.97);
    }

.lesson-time {
    font-weight: 600;
}

.lesson-student {
    font-weight: 600;
}

.lesson-scheduled {
    border-left: 4px solid var(--mud-palette-info);
    background: rgba(33, 150, 243, 0.10);
}

.lesson-completed {
    border-left: 4px solid var(--mud-palette-success);
    background: rgba(76, 175, 80, 0.10);
}

.lesson-cancelled {
    border-left: 4px solid var(--mud-palette-error);
    background: rgba(244, 67, 54, 0.08);
}

.lesson-no-show {
    border-left: 4px solid var(--mud-palette-warning);
    background: rgba(255, 152, 0, 0.10);
}

.lesson-default {
    border-left: 4px solid var(--mud-palette-text-secondary);
    background: rgba(0, 0, 0, 0.05);
}

/* =========================================================
   CALENDAR SLOTS (shared)
   Same typography as the main calendar page so every
   calendar (lessons, instructor, student, vehicle) matches.
   ========================================================= */

.cal-slot__time {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 3px;
}

.cal-slot__title {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.cal-slot__student {
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
    line-height: 1.2;
}

.cal-slot__detail {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #666;
    margin-top: 3px;
    line-height: 1.2;
}

    .cal-slot__detail .mud-icon-root {
        font-size: 12px;
    }

/* Lesson cards that can be dragged to a new slot */
.lesson-card.lesson-card--draggable {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

    .lesson-card.lesson-card--draggable:active {
        cursor: grabbing;
    }

.calendar-slot.drag-over {
    background: rgba(25, 118, 210, 0.10);
    outline: 2px dashed var(--mud-palette-primary);
    outline-offset: -2px;
}


/* Student profile tab panels (tightened on mobile below) */
.profile-tab-panels {
    padding: 24px;
}


/* =========================================================
   MOBILE: buttons and action rows
   Keeps every page's own design; only stops buttons from
   being cut off or overflowing their cards on small screens.
   ========================================================= */

@media (max-width: 700px) {

    /* Header rows (title + buttons): opt in with class="responsive-header".
       Prefixed with "html" so these beat MudStack's own
       ".flex-row { flex-direction: row !important }", which loads later. */
    html .responsive-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }

    html .responsive-header > .mud-button-root,
    html .responsive-header > .mud-menu,
    html .responsive-header > .mud-menu .mud-button-root {
        width: 100%;
    }

    /* A group of buttons inside a responsive header: one per line, full width */
    html .responsive-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
    }

    html .responsive-actions > .mud-button-root {
        width: 100%;
    }

    .profile-tab-panels {
        padding: 12px !important;
    }

    /* Button rows inside cards, forms and dialogs wrap instead of overflowing */
    .mud-card-actions,
    .mud-dialog-actions,
    .card-actions,
    .form-actions,
    .page-actions,
    .hero-actions,
    .branding-actions,
    .package-actions,
    .licence-card-actions {
        flex-wrap: wrap !important;
        gap: 8px;
    }

    /* A button is never wider than its container; long labels wrap */
    .mud-button-root {
        max-width: 100%;
    }

    .mud-button-root .mud-button-label {
        white-space: normal;
        text-align: center;
    }
}