/* ============================================================
   Resource Centre — right-docked slide-in support panel.
   Design reference: Claude Design "Resource Centre" option 1a.
   All classes are prefixed rc- and live here (no Blazor scoped CSS in this repo).
   ============================================================ */

.rc-panel {
    --rc-header-bg: #0F172B;
    --rc-surface: #ffffff;
    --rc-border: #DEE2ED;
    --rc-lines: #F0F2F7;
    --rc-hover: #F8FAFB;
    --rc-title: #0F172B;
    --rc-body: #4B5563;
    --rc-muted: #6B7280;
    --rc-chevron: #C5CCD9;
    --rc-accent: #155DFC;
    --rc-badge-bg: #EFF6FF;
    --rc-badge-border: #B8D5F9;
    --rc-badge-fg: #1E55C4;
    --rc-track: #DEE2ED;

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 372px;
    /* Above the forced nav drawer (1300) and app bar (1250), below MudBlazor dialogs (1400)
       so dialogs opened from the panel still stack over it. */
    z-index: 1310;
    display: flex;
    flex-direction: column;
    background: var(--rc-surface);
    border-left: 1px solid var(--rc-border);
    box-shadow: -8px 0 24px rgba(15, 23, 43, .10);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.22, 1, .3, 1), width .25s ease;
    will-change: transform;
}

.rc-panel.rc-open {
    transform: translateX(0);
}

.rc-panel.rc-expanded {
    width: min(880px, 92vw);
}

.rc-panel:focus {
    outline: none;
}

/* ---------- header ---------------------------------------- */

.rc-head {
    flex: none;
    background: var(--rc-header-bg);
    padding: 20px 20px 22px;
}

.rc-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
}

.rc-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.rc-head-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
}

.rc-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-title-sm {
    font-size: 17px;
}

.rc-head-btn {
    width: 30px;
    height: 30px;
    flex: none;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .8);
    transition: background .15s ease, color .15s ease;
}

.rc-head-btn:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.rc-head-btn .mud-icon-root {
    font-size: 22px;
}

/* search pill */
.rc-search {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 5px;
    padding: 0 12px;
    height: 40px;
}

.rc-search .mud-icon-root {
    font-size: 20px;
    color: var(--rc-muted);
    flex: none;
}

.rc-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    color: #252525;
}

.rc-search input::placeholder {
    color: var(--rc-muted);
    opacity: 1;
}

.rc-search-clear {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--rc-muted);
}

.rc-search-clear .mud-icon-root {
    font-size: 18px;
}

/* ---------- body ------------------------------------------ */

.rc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

.rc-loading {
    padding: 24px 20px;
}

.rc-empty {
    padding: 24px 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--rc-body);
}

/* section caption */
.rc-caption {
    padding: 16px 20px 8px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rc-muted);
}

/* ---------- list rows ------------------------------------- */

.rc-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rc-lines);
    cursor: pointer;
    text-align: left;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
    font-family: inherit;
    transition: background .15s ease;
}

.rc-row:hover,
.rc-row:focus-visible {
    background: var(--rc-hover);
    outline: none;
}

.rc-row:last-child {
    border-bottom: 0;
}

.rc-row-icon {
    flex: none;
    margin-top: 2px;
}

.rc-row-icon .mud-icon-root {
    font-size: 22px;
    color: var(--rc-accent);
}

.rc-row-main {
    flex: 1;
    min-width: 0;
}

.rc-row-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-title);
}

.rc-row-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--rc-body);
    margin-top: 3px;
}

.rc-row-chevron {
    flex: none;
    margin-top: 2px;
}

.rc-row-chevron .mud-icon-root {
    font-size: 20px;
    color: var(--rc-chevron);
}

.rc-row-count {
    flex: none;
    margin-top: 2px;
    font-size: 12px;
    color: var(--rc-muted);
}

/* compact row used for article lists */
.rc-row-compact {
    padding: 12px 20px;
}

.rc-row-compact .rc-row-icon .mud-icon-root {
    font-size: 19px;
}

.rc-row-compact .rc-row-title {
    font-weight: 500;
}

/* ---------- expanders (Help for this screen) ---------------
   Styled entirely with the --rc-* tokens, which the dark block below re-points at
   the Mud palette — so these need no separate `.rc-dark` rules.
   ---------------------------------------------------------- */

.rc-exp {
    border-bottom: 1px solid var(--rc-lines);
}

.rc-exp:last-child {
    border-bottom: 0;
}

.rc-exp-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 13px 20px;
    cursor: pointer;
    transition: background .15s ease;
}

.rc-exp-head:hover,
.rc-exp-head:focus-visible {
    background: var(--rc-hover);
    outline: none;
}

.rc-exp-count {
    flex: none;
    font-size: 12px;
    color: var(--rc-muted);
}

.rc-exp-chevron {
    flex: none;
    display: flex;
    transition: transform .18s ease;
}

.rc-exp-chevron .mud-icon-root {
    font-size: 20px;
    color: var(--rc-chevron);
}

.rc-exp-head.rc-exp-open .rc-exp-chevron {
    transform: rotate(180deg);
}

/* Indented and tinted so an item reads as belonging to the group above it. */
.rc-exp-body {
    background: var(--rc-hover);
    border-top: 1px solid var(--rc-lines);
}

.rc-exp-body .rc-row {
    padding-left: 30px;
    border-bottom: 1px solid var(--rc-lines);
}

.rc-exp-body .rc-row:last-child {
    border-bottom: 0;
}

.rc-exp-body .rc-row:hover,
.rc-exp-body .rc-row:focus-visible {
    background: var(--rc-surface);
}

/* Descriptions run long in authored content — keep rows to a scannable two lines. */
.rc-exp-body .rc-row-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* title + badge line (Finish Setting Up) */
.rc-row-titleline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rc-badge {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .06em;
    color: var(--rc-badge-fg);
    background: var(--rc-badge-bg);
    border: 1px solid var(--rc-badge-border);
    border-radius: 999px;
    padding: 4px 7px;
    white-space: nowrap;
}

.rc-progress {
    margin-top: 8px;
    height: 4px;
    border-radius: 999px;
    background: var(--rc-track);
    overflow: hidden;
}

.rc-progress > span {
    display: block;
    height: 100%;
    background: var(--rc-accent);
    border-radius: 999px;
    transition: width .3s ease;
}

/* ---------- support action cards -------------------------- */

.rc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px 16px;
    border-bottom: 1px solid var(--rc-lines);
}

.rc-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--rc-border);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    transition: border-color .15s ease, background .15s ease;
}

.rc-action:hover {
    border-color: var(--rc-accent);
    background: var(--rc-hover);
}

.rc-action .mud-icon-root {
    font-size: 20px;
    color: var(--rc-accent);
    flex: none;
}

.rc-action-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-title);
}

.rc-action-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--rc-body);
    margin-top: 1px;
}

/* ---------- search results -------------------------------- */

.rc-result-match {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--rc-muted);
    margin-top: 3px;
}

.rc-result-match .mud-icon-root {
    font-size: 14px;
    color: var(--rc-muted);
}

/* ---------- release notes --------------------------------- */

.rc-release {
    padding: 16px 20px;
    border-bottom: 1px solid var(--rc-lines);
}

.rc-release:last-child {
    border-bottom: 0;
}

.rc-release-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rc-release-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rc-title);
}

.rc-release-meta {
    font-size: 12px;
    color: var(--rc-muted);
    margin-top: 4px;
}

/* ---------- in-panel article ------------------------------ */

.rc-article {
    padding: 16px 20px 28px;
}

.rc-article-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 16px;
    border: none;
    border-radius: 999px;
    background: var(--rc-accent);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.rc-article-cta:hover {
    background: #0E4FD8;
}

.rc-article-cta .mud-icon-root {
    font-size: 16px;
    color: #ffffff;
}

.rc-panel.rc-expanded .rc-article {
    max-width: 720px;
    margin: 0 auto;
}

.rc-article .markdig-markdown {
    font-size: 13.5px;
    line-height: 1.6;
}

.rc-article .markdig-markdown h1 {
    font-size: 20px;
}

.rc-article .markdig-markdown h2 {
    font-size: 17px;
}

.rc-article .markdig-markdown h3 {
    font-size: 15px;
}

.rc-article .markdig-markdown h4,
.rc-article .markdig-markdown h5,
.rc-article .markdig-markdown h6 {
    font-size: 14px;
}

.rc-article .markdig-markdown img {
    max-width: 100%;
    height: auto;
}

.rc-article .markdig-markdown pre {
    overflow-x: auto;
    max-width: 100%;
}

.rc-article .markdig-markdown table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.rc-article .markdig-markdown blockquote {
    margin-left: 0;
    margin-right: 0;
}

/* ---------- footer tab bar -------------------------------- */

.rc-tabs {
    flex: none;
    border-top: 1px solid var(--rc-border);
    display: flex;
    background: var(--rc-surface);
}

.rc-tab {
    flex: 1;
    padding: 10px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    cursor: pointer;
    border: 0;
    background: transparent;
    font-family: inherit;
    color: var(--rc-muted);
    transition: color .15s ease, background .15s ease;
}

.rc-tab:hover {
    background: var(--rc-hover);
}

.rc-tab .mud-icon-root {
    font-size: 22px;
    color: inherit;
}

.rc-tab span {
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
}

.rc-tab.rc-tab-active {
    color: var(--rc-title);
}

.rc-tab.rc-tab-active span {
    font-weight: 500;
}

.rc-tab-dot {
    position: absolute;
    top: 8px;
    right: 34px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #D32F2F;
}

/* ---------- responsive ------------------------------------ */

@media (max-width: 600px) {
    .rc-panel,
    .rc-panel.rc-expanded {
        width: 100%;
        border-left: 0;
    }
}

/* ---------- dark palettes ---------------------------------
   The web shell renders MudBlazor's PaletteLight and never stamps `mud-theme-dark`,
   so MainLayout passes its own IsDarkTheme flag through as `.rc-dark`. The
   `.mud-theme-dark` selector covers the mobile-frame preview host.
   ---------------------------------------------------------- */

.rc-panel.rc-dark,
.mud-theme-dark .rc-panel {
    --rc-surface: var(--mud-palette-surface);
    --rc-border: var(--mud-palette-table-lines);
    --rc-lines: var(--mud-palette-divider);
    --rc-hover: var(--mud-palette-action-default-hover);
    --rc-title: var(--mud-palette-text-primary);
    --rc-body: var(--mud-palette-text-secondary);
    --rc-muted: var(--mud-palette-text-secondary);
    --rc-chevron: var(--mud-palette-text-disabled);
    --rc-track: var(--mud-palette-lines-default);
    --rc-badge-bg: rgba(21, 93, 252, .16);
    --rc-badge-border: rgba(21, 93, 252, .38);
    --rc-badge-fg: #9EC1FF;
    box-shadow: -8px 0 24px rgba(0, 0, 0, .45);
}

.rc-panel.rc-dark .rc-search,
.mud-theme-dark .rc-panel .rc-search {
    background: var(--mud-palette-background-gray);
}

.rc-panel.rc-dark .rc-search input,
.mud-theme-dark .rc-panel .rc-search input {
    color: var(--mud-palette-text-primary);
}
