/* =========================================================
   DRIVEFLOW PAGE DESIGN
   The Student Directory look (Features/Students/Components/
   StudentToolbar.razor.css), shared by every page:

     <PageHero>          banner: eyebrow, title, description, icon tile
     .df-toolbar         white card under the banner: heading, main
                         button, then search and filters
     .df-toolbar--inside the same toolbar inside a table card (top of
                         a data grid), without its own border

   Global rather than scoped so the input and button rules reach the
   MudBlazor components inside.
   ========================================================= */


/* =========================================================
   HERO BANNER
   ========================================================= */

.df-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 145px;
    padding: 24px 36px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border: 1px solid #dbe8ff;
    border-radius: 22px;
    background: linear-gradient(115deg, #edf4ff 0%, #f5f8ff 52%, #eaf2ff 100%);
}

.df-hero__content {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

.df-hero__eyebrow {
    margin-bottom: 9px;
    color: #3169f5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.df-hero__title {
    margin: 0 0 8px;
    color: #172d53 !important;
    font-size: clamp(27px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.df-hero__description {
    max-width: 760px;
    margin: 0;
    color: #536783 !important;
    font-size: 14px;
    line-height: 1.6;
}

.df-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

/* Actions hidden by a permission check leave no gap. */
.df-hero__actions:not(:has(*)) {
    display: none;
}

.df-hero__visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 82px;
    height: 82px;
    margin-left: 28px;
    margin-right: 4px;
}

.df-hero__icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 23px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(43, 91, 177, 0.08);
}

.df-hero__icon {
    color: #3169f5 !important;
    font-size: 42px !important;
}

.df-hero__decoration {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(76, 123, 221, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.df-hero__decoration--one {
    top: -170px;
    right: 100px;
    width: 280px;
    height: 280px;
}

.df-hero__decoration--two {
    right: -110px;
    bottom: -200px;
    width: 320px;
    height: 320px;
    background: rgba(205, 223, 255, 0.12);
}


/* =========================================================
   TOOLBAR CARD
   ========================================================= */

.df-toolbar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 24px 24px 20px;
    margin-bottom: 20px;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    background: #ffffff;
}

/* At the top of a table card: the card provides the border. */
.df-toolbar--inside {
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #e8edf4;
    border-radius: 0;
}

.df-toolbar__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.df-toolbar__title {
    margin: 0 0 5px !important;
    color: #172d53 !important;
    font-size: 21px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

.df-toolbar__subtitle {
    margin: 0 !important;
    color: #718096 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

/* Buttons, selects, date pickers and searches: one row, wrapping. */
.df-toolbar__actions,
.df-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.df-toolbar__actions {
    justify-content: flex-end;
}

.df-toolbar__filters {
    justify-content: flex-start;
}

/* Filter widths, set with Class (it lands on the field's outer element, a
   child of the filters row). Not Style: MudBlazor puts Style on the inner
   input, whose box stacks vertically, so a flex size there became height. */
.df-filter-search {
    flex: 1 1 280px;
    min-width: 220px;
}

.df-filter-select {
    flex: 0 0 230px;
    width: 230px;
}

.df-filter-select--narrow {
    flex-basis: 180px;
    width: 180px;
}

.df-filter-date {
    flex: 0 0 200px;
    width: 200px;
}

/* Inputs inside the toolbar: the Student Directory search and status look. */

.df-toolbar .mud-input-control {
    margin-top: 0;
}

.df-toolbar .mud-input-root {
    border-radius: 9px;
    background: #ffffff;
}

.df-toolbar .mud-input-outlined-border {
    border-color: #dce3ed;
    border-radius: 9px;
}

.df-toolbar .mud-input-root:hover .mud-input-outlined-border {
    border-color: #9bb8f7;
}

.df-toolbar .mud-input-root.mud-focused .mud-input-outlined-border {
    border-color: #3169f5;
    border-width: 1px;
}

.df-toolbar .mud-input-adornment {
    color: #74849b;
}

/* Filled primary buttons: the "New Student" look. */
.df-toolbar .mud-button-filled.mud-button-filled-primary,
.df-hero__actions .mud-button-filled.mud-button-filled-primary,
.df-primary-button {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 9px;
    background: #2867e8 !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(40, 103, 232, 0.15);
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

    .df-toolbar .mud-button-filled.mud-button-filled-primary:hover,
    .df-hero__actions .mud-button-filled.mud-button-filled-primary:hover,
    .df-primary-button:hover {
        background: #1f55cc !important;
        box-shadow: 0 5px 12px rgba(40, 103, 232, 0.22);
        transform: translateY(-1px);
    }

/* Other toolbar buttons keep MudBlazor's look with the same shape. */
.df-toolbar .mud-button-root:not(.mud-icon-button) {
    min-height: 40px;
    border-radius: 9px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .df-hero {
        padding: 30px;
    }

    .df-hero__visual {
        margin-left: 20px;
    }

    .df-toolbar {
        padding: 20px;
    }
}

@media (max-width: 650px) {

    .df-hero {
        min-height: 0;
        padding: 26px 22px;
        border-radius: 18px;
    }

    .df-hero__eyebrow {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .df-hero__title {
        font-size: 29px;
        letter-spacing: -0.6px;
    }

    .df-hero__description {
        font-size: 14px;
        line-height: 1.7;
    }

    .df-hero__visual {
        width: 70px;
        height: 70px;
        margin-left: 12px;
    }

    .df-hero__icon-container {
        width: 70px;
        height: 70px;
        border-radius: 18px;
    }

    .df-hero__icon {
        font-size: 36px !important;
    }

    .df-toolbar {
        gap: 16px;
        padding: 18px 16px;
    }

    .df-toolbar__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .df-toolbar__actions,
    .df-toolbar__filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

        .df-toolbar__actions > *,
        .df-toolbar__filters > * {
            width: 100%;
        }

    .df-filter-search,
    .df-filter-select,
    .df-filter-date {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {

    .df-hero__visual {
        display: none;
    }

    .df-hero__title {
        font-size: 26px;
    }

    .df-toolbar__title {
        font-size: 19px !important;
    }
}
