/* /Components/Ssr/SsrTextField.razor.rz.scp.css */
/*
  値が入力済みで非フォーカスのときのラベル浮上
  本家 MudTextField は C# で mud-shrink クラスを付与するが、静的 SSR では値の変化を検知できないため
  input の placeholder=" " と :placeholder-shown でブラウザ側に判定させる。
  フォーカス中は MudBlazor 本体の :focus-within 規則（色・位置）を優先するため :not(:focus-within) で除外する。
  変換値は MudBlazor 9.11 の .mud-shrink ~ label 規則と同一。
*/
.mud-input:not(:focus-within):has(> input:not(:placeholder-shown)) ~ label.mud-input-label.mud-input-label-inputcontrol[b-3lnuxkyviy] {
    transform: translate(0, 1.5px) scale(0.75);
    transform-origin: top left;
    max-width: 133.3333333333%;
    color: var(--mud-palette-text-primary);
}

.mud-input:not(:focus-within):has(> input:not(:placeholder-shown)) ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-filled[b-3lnuxkyviy] {
    transform: translate(12px, 10px) scale(0.75);
    max-width: calc((100% - 12px) / .75);
}

.mud-input:not(:focus-within):has(> input:not(:placeholder-shown)) ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-label-outlined[b-3lnuxkyviy] {
    transform: translate(14px, -6px) scale(0.75);
    max-width: calc((100% - 14px) / .75);
}

/* Outlined：値ありのときは枠線上部にラベル分の切れ目を空ける（本家の .mud-shrink > legend 規則） */
.mud-input.mud-input-outlined:not(:focus-within):has(> input:not(:placeholder-shown)) > .mud-input-outlined-border legend[b-3lnuxkyviy] {
    width: auto;
    padding: 0 5px;
}
