﻿/* Single source of truth for the fixed footer's reserved height, so every page's bottom
   padding (see MainLayout.razor) and the footer's own min-height (MainLayout.razor.css)
   can never drift out of sync. */
:root {
    --howl-footer-height: 56px;
}

/* Cards */
.card-360 {
    width: 100%;
    max-width: 360px;
}

.card-540 {
    width: 100%;
    max-width: 540px;
}

.card-720 {
    width: 100%;
    max-width: 720px;
}

/* Expansion panel title row: icon, text and an action button group. The text column must be
   allowed to shrink (min-width: 0) and break long unspaced values like keys and URIs, otherwise
   it pushes the actions out of the panel on narrow screens. */
.panel-title-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.panel-title-icon {
    flex: 0 0 48px;
    margin-right: 0.75rem;
    text-align: center;
}

.panel-title-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.panel-title-actions {
    flex: 0 0 auto;
    margin-left: 0.5rem;
}

/* Phones: the text gets the full row and the actions move to their own line below it. */
@media (max-width: 599.98px) {
    .panel-title-row {
        flex-wrap: wrap;
    }

    .panel-title-icon {
        flex-basis: 32px;
        margin-right: 0.5rem;
    }

    .panel-title-text {
        flex: 1 1 0;
    }

    .panel-title-actions {
        flex-basis: 100%;
        display: flex;
        justify-content: flex-end;
        margin: 0.5rem 0 0;
    }
}

/* Page and modal image headers */

.imageheader {
    width: 125px;
    height: 125px;
    background-size: cover;
    margin: 0 auto;
}

.imageheader-sm {
    width: 75px;
    height: 75px;
    background-size: cover;
    margin: 0 auto;
}

.imageheader-lg {
    width: min(500px, 100%);
    aspect-ratio: 1;
    background-size: cover;
    margin: 0 auto;
}

.imageheader-circleborder {
    background-image: radial-gradient(transparent 50px, rgba(81, 89, 96, 0) 60px, rgba(81, 89, 96, 1) 65px);
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.imageheader-sm-circleborder-modal {
    /* Matches the MudDialog paper background (--mud-palette-surface) so the vignette blends
       into the dialog instead of showing a mismatched ring. */
    background-image: radial-gradient(transparent 35px, var(--mud-palette-surface) 38px);
    width: 75px;
    height: 75px;
    margin: 0 auto;
}

.imageheader-circleborder-page {
    /* Matches the page background (--mud-palette-background) so the vignette blends into the
       page instead of showing a mismatched ring - see .imageheader-sm-circleborder-modal above. */
    background-image: radial-gradient(transparent 50px, var(--mud-palette-background) 58px);
    width: 125px;
    height: 125px;
    margin: 0 auto;
}


/* Pushover */
.pushover-logo,
.pushover-logo-small {
    display: inline-block;
    background-size: 1.4em;
    background-image: url('/img/pushover-logo.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.pushover-logo {
    width: 1.4em; /* match current font-size */
    height: 1.4em;
}

.pushover-logo-small {
    width: 1.0em; /* match current font-size */
    height: 1.0em;
    background-size: 1.0em;
}

    /* If you need a slight visual shrink (SVG has inner padding), tweak background-size */
    .pushover-logo.shrink,
    .pushover-logo-small.shrink {
        background-size: 0.9em;
    }
