@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

.app-topbar {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}

.app-topbar .mud-typography {
    font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.01em;
}

.packages-page,
.package-detail-page {
    width: min(1128px, calc(100% - 96px));
    margin-inline: auto;
    padding: 48px 0 80px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 85px 20px;
    text-align: center;
}

.package-list,
.deployment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.package-row,
.deployment-row {
    padding: 16px 20px;
}

.deployment-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.deployment-row-headline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deployment-row-alert {
    margin-top: 12px;
}

.packages-pagination,
.deployments-pagination {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.deployment-status-chip .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.deployment-status-chip.status-pending .status-dot { background: #9e9e9e; }
.deployment-status-chip.status-provisioning .status-dot { background: #1976d2; }
.deployment-status-chip.status-migrating .status-dot { background: #1976d2; }
.deployment-status-chip.status-active .status-dot { background: #2e7d32; }
.deployment-status-chip.status-failed .status-dot { background: #c62828; }

@media (max-width: 900px) {
    .packages-page,
    .package-detail-page {
        width: min(100% - 56px, 760px);
    }
}

@media (max-width: 680px) {
    .packages-page,
    .package-detail-page {
        width: min(100% - 32px, 520px);
        padding-top: 32px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Blazor */

#blazor-error-ui {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: none;
    padding: 0.75rem 1.25rem;
    background: #fff5cc;
    box-shadow: 0 2px 8px #0002;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

.boot-loading {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #eef0ea;
}

.boot-loading-brand {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #1c1b1e;
}

.loading-progress {
    display: block;
    width: 56px;
    height: 56px;
}

.loading-progress circle {
    fill: none;
    stroke: #e2e0d8;
    stroke-width: 0.45rem;
    transform: rotate(-90deg);
    transform-origin: center;
}

.loading-progress circle:last-child {
    stroke: #0e6b64;
    stroke-linecap: round;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 50ms ease-in-out;
}

.loading-progress-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c5a55;
}

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

@media (prefers-color-scheme: dark) {
    .boot-loading {
        background: #121214;
    }

    .boot-loading-brand {
        color: #f0efe9;
    }

    .loading-progress circle {
        stroke: #2c2c30;
    }
}

/* Status pages (not found) */

.status-page {
    display: flex;
    min-height: calc(100vh - var(--mud-appbar-height));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 48px 24px 96px;
    text-align: center;
}

.status-code {
    font-size: 56px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--mud-palette-text-secondary);
}

.status-rule {
    width: 40px;
    height: 2px;
    background: var(--mud-palette-primary);
}

.status-eyebrow {
    color: var(--mud-palette-text-secondary) !important;
}

.status-title {
    max-width: 480px;
    font-weight: 600 !important;
}

.status-body {
    max-width: 420px;
    color: var(--mud-palette-text-secondary);
}

.status-attempted-path {
    max-width: 420px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    word-break: break-all;
}
