/* The portal's look comes from the shared theme (Shared.UI/Themes/Theme.cs); only layout lives here. */

.portal-bar {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-bottom: 1px solid var(--mud-palette-divider);
}

/* The bars are full on a small phone. */
@media (max-width: 599px) {
    .portal-bar .mud-toolbar-gutters {
        padding-left: .5rem;
        padding-right: .5rem;
    }
}

.portal-intro {
    max-width: 44rem;
}

.portal-form {
    max-width: 48rem;
}

.portal-steps {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
}

.portal-steps li {
    display: flex;
    align-items: center;
    gap: .375rem;
}

.portal-steps li > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: 1px solid var(--mud-palette-lines-inputs);
    font-weight: 600;
}

.portal-steps li.is-current {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.portal-steps li.is-current > span:first-child,
.portal-steps li.is-done > span:first-child {
    background-color: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

/* At phone width only the current step keeps its name. */
@media (max-width: 599px) {
    .portal-steps li:not(.is-current) .portal-steps-name {
        display: none;
    }
}

.portal-choice {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    width: 100%;
    height: 100%;
    padding: 1rem;
    text-align: left;
    color: var(--mud-palette-text-primary);
    background: transparent;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: var(--mud-default-borderradius);
    cursor: pointer;
    font: inherit;
}

.portal-choice:hover,
.portal-choice:focus-visible {
    border-color: var(--mud-palette-primary);
}

.portal-choice.is-selected {
    border: 2px solid var(--mud-palette-primary);
    padding: calc(1rem - 1px);
}

.portal-choice span {
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
}

.portal-file-name {
    overflow-wrap: anywhere;
}

/* A subject can be one long word, and PageHeader doesn't know that. */
h1.mud-typography {
    overflow-wrap: anywhere;
}

/* Help & guides, as the Office's Knowledge Base draws them. */
.help-content h2 {
    margin-top: 1.25rem;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: .75rem 0;
}

.help-table th,
.help-table td {
    border: 1px solid var(--mud-palette-lines-default);
    padding: .5rem .625rem;
    text-align: left;
    vertical-align: top;
    font-size: .875rem;
}

.help-table th {
    background-color: var(--mud-palette-background-gray);
    font-weight: 600;
}

.help-flow {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0;
}

.help-flow-step {
    flex: 1 1 9rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-left: 4px solid var(--mud-palette-primary);
    border-radius: var(--mud-default-borderradius);
    padding: .5rem .75rem;
    background-color: var(--mud-palette-surface);
}

.help-flow-step .n {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
}

.help-flow-step .t {
    display: block;
    font-weight: 600;
    font-size: .875rem;
}

.help-flow-step .d {
    display: block;
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}
