@charset "utf-8";
/*
  p11 床位即時資訊／急診即時資訊 補充樣式（載入順序在 style.css 之後）

  1. .p11_field / .p11_label / .p11_value
     取代原本 .p11_icon01～09 的「圖片標籤」（images/p11/icon01～04.png、01～05.jpg），
     改成文字，顏色和原圖相同（#F6B035）。
     標籤左邊的橘色圓形鉛筆是裝飾，用 CSS 畫出；不需要的話刪掉 .p11_label::before 即可。

  2. 修正床位列圖示大小不一致：
     原本 .p11_icon 用 background-size: contain，圖示會跟著行高縮放。
     「亞急性呼吸照護病床」（9 個字）超過標題欄內容寬度 150px 而換成兩行，
     行高從 39px 變 67px，圖示就跟著放大並被裁切。
*/

/* ---------- 1. 文字標籤 ---------- */
.p11_field {
    display: flex;
    align-items: flex-start;
    margin-left: 63px;
    margin-bottom: 20px;
    line-height: 28px;
}

.p11_label {
    position: relative;
    flex: 0 0 192px;           /* 與原圖片同寬 */
    margin-right: 18px;        /* 192 + 18 = 210，與原本 padding-left: 210px 對齊 */
    padding-left: 30px;        /* 留給左側圓形圖示 */
    color: #F6B035;
    font-size: 16px;
    white-space: nowrap;
    text-align: justify;
    text-align-last: justify;  /* 字距平均分散，接近原圖片的排版 */
}

.p11_label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #F6B035 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm17.71-10.21a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") no-repeat center / 13px 13px;
}

.p11_value {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 15px;
}

/* ---------- 2. 床位列圖示大小固定 ---------- */
.p11_icon {
    background-size: 39px 39px;   /* 一般單行列的實際顯示大小，換行時不再放大 */
}

.p11_text_title {
    width: 190px;                 /* 原 180px：內容寬 150px 放不下 9 個字(17px)，加寬到 160px */
}

/* style.css 的 div.main 是 width:100% 再加左右各 10% 外距，總寬 120%，任何寬度都會出現橫向捲軸。
   改成 width:auto，外觀（左右各留 10%）不變，但不再超出。 */
div.main {
    width: auto;
}

/* 原本寫在 HTML 的 inline style，改成 class 才能在手機版調整 */
.p11_field_last {
    margin-bottom: 100px;
}

.p11_note {
    padding-left: 63px;
    padding-top: 30px;
}

/* ---------- 3. 手機版（RWD） ----------
   這兩頁是嵌在官網的 iframe 裡，判斷依據是 iframe 本身的寬度。
   680px 以下，桌機版的固定寬度（左邊距 63px、標籤欄 210px、床位四欄）放不下，改成直式排版。 */
@media (max-width: 680px) {
    div.main {                    /* style.css 用 div.main，選擇器要同等級才蓋得過 */
        width: auto;
        margin: 0 12px;           /* 原本 width:100% + 左右各 10% 外距，會往右超出 */
    }

    .p3_title {
        padding-left: 52px;
        font-size: 18px;
        background-size: 42px auto;
    }

    /* 標籤／數值：上下排列，數值對齊標籤文字 */
    .p11_field {
        flex-direction: column;
        margin-left: 0;
        margin-bottom: 14px;
    }

    .p11_label {
        flex: none;
        margin-right: 0;
        text-align: left;
        text-align-last: auto;    /* 不再分散對齊 */
    }

    .p11_value {
        padding-left: 30px;
        padding-right: 0;
        overflow-wrap: anywhere;
    }

    .p11_field_last {
        margin-bottom: 16px;
    }

    /* 急診頁的數值都很短，標籤和數值維持同一行 */
    .p11_con .p11_field {
        flex-direction: row;
        margin-bottom: 10px;
    }

    .p11_con .p11_label {
        flex: 0 0 auto;
        min-width: 194px;          /* 最長的「是否已通報119滿床：」約 189px（含左側圖示 30px） */
    }

    .p11_con .p11_value {
        padding-left: 8px;
        font-weight: bold;
    }

    /* 病床分類標題圖片 */
    .p11_title {
        margin: 22px 0 8px;
    }

    .p11_title img {
        max-width: 100%;
        height: auto;
    }

    /* 床位列：第一行「圖示＋病床名稱」，第二行三個數字平均分欄 */
    .p11_icon {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 6px;
        margin-left: 0;
        padding: 6px 0 6px 40px;
        border-bottom: 1px dashed #e5e5e5;
        background-size: 30px 30px;
        background-position: left 0 top 6px;
    }

    .p11_text_title {
        grid-column: 1 / -1;       /* 病床名稱獨佔第一行 */
        width: auto;
        float: none;
        margin: 0;
        padding: 0;
        background: none;
        border-bottom: 0;
        font-size: 16px;
        line-height: 30px;
    }

    .p11_text {
        width: auto;
        float: none;
        font-size: 13px;
        line-height: 20px;
        white-space: nowrap;
    }

    .p11_note {
        padding-left: 0;
        padding-top: 20px;
        font-size: 14px;
    }
}
