/* M2 で _content/Logiscope2.Chat.UI/css/chat.css を参照する（UI設計書 6章）。
   html/body のフォントは本体（Logiscope2.Server/wwwroot/app.css）の最終値に合わせる。
   chat.css の .chat-root も同じ書体を明示しており、画面全体で本体と同一になる。 */
html, body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

/* 下端・左右の余白に安全領域（App.UI の app-shell.css の変数。index.html の viewport-fit=cover）の幅を足し、文言・「再読込」・× を
   ホームインジケーター・横向きのノッチの側の外に出す。帯の背景は画面の端まで塗る（Wasm設計書 5章。決定 Q41・修正候補 No.51） */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem calc(3.5rem + var(--app-safe-right, 0px)) calc(0.6rem + var(--app-safe-bottom, 0px)) calc(1.25rem + var(--app-safe-left, 0px));
    background: #ffeb99;
}

/* 閉じる記号（×）。帯の右端の上下中央（下端の安全領域の余白を除いた範囲の中央）に、タッチでも押せる 44px 四方の当たり判定で置く（修正候補 No.73・No.51） */
#blazor-error-ui .dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    top: calc(50% - var(--app-safe-bottom, 0px) / 2);
    right: calc(0.25rem + var(--app-safe-right, 0px));
    transform: translateY(-50%);
    min-width: 44px;
    min-height: 44px;
    font-size: 1.5rem;
    line-height: 1;
}

/* 新しい版の案内（index.html の #app-update-ui。Wasm設計書 6章。修正候補 No.39）。
   置き場所と閉じる記号は #blazor-error-ui（画面の下端の帯・右端の 44px 四方の ×）、
   色と「再読み込み」の見た目は接続の帯（chat.css の .connection-banner.reconnecting・.connection-retry）に合わせる。
   下端の安全領域（ホームインジケーター）と横向きの左右の安全領域の分は、#blazor-error-ui と同じく帯の内側に取る（Wasm設計書 6章。決定 Q41・修正候補 No.51） */
#app-update-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 8px calc(3.5rem + var(--app-safe-right, 0px)) calc(8px + var(--app-safe-bottom, 0px)) calc(1.25rem + var(--app-safe-left, 0px));
    background: #FFF4E5;
    color: #1A1A1A;
    font-size: 13px;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.15);
}

#app-update-ui[hidden] {
    display: none;
}

#app-update-ui .reload {
    padding: 2px 6px;
    border: 0;
    background: none;
    color: #0070C0;
    font: inherit;
    cursor: pointer;
}

#app-update-ui .reload:hover { text-decoration: underline; }

#app-update-ui .dismiss {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: calc(50% - var(--app-safe-bottom, 0px) / 2);
    right: calc(0.25rem + var(--app-safe-right, 0px));
    transform: translateY(-50%);
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* 本体（Logiscope2.Server/wwwroot/app.css）と同じフォーカスリング */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
