/* 1. 表格整體樣式 (應用於兩個表格) */
.info-table,
.info-pic-table {
    width: 100%;
    max-width: calc(100% - 80px);
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    background-color: var(--op-white);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 2. 標題欄樣式 (<thead> th) */
.info-table thead th,
.info-pic-table thead th {
    background-color: var(--sub-blue2);
    color: white;
    font-weight: 700;
    padding: 1rem 0.5rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.info-table thead th:last-child,
.info-pic-table thead th:last-child {
    border-right: none;
}

/* 表格標題列 (.table-title-row) */
.info-table thead .table-title-row th {
    background-color: var(--sub-blue3);
    color: var(--op-white);
    font-weight: 600;
    padding: 1rem 0.5rem;
    text-align: center;
    border: none;
}

/* 3. 第一列/標籤列樣式 (<tbody> th) */
.info-table tbody th,
.info-pic-table tbody th {
    background-color: var(--sub-blue4);
    color: var(--sub-blue2);
    font-weight: 600;
    padding: 16px;
    text-align: center;
    border: 1px solid #daeafe;
}

/* 4. 數據格樣式 (<td>) */
.info-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    text-align: center;
}

.info-table-left {
    text-align: left !important;
}

table.info-table.left th,
table.info-table.left td,
table.info-table.left td p {
    text-align: left !important;
}
.left td,
tbody.left {
    text-align: left !important;
}

.info-table p {
        margin: 8px 0;
}

.info-table ul,
.info-table ol {
    padding-left: 24px;
    margin: 8px 0;
}

.info-pic-table td {
    padding: 12px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    height: auto;
}

/* 5. 隔行變色 */
.info-table tbody tr:nth-child(even),
.info-pic-table tbody tr:nth-child(even) {
    background-color: var(--op-gray4);
}

.info-table tbody tr:nth-child(odd),
.info-pic-table tbody tr:nth-child(odd) {
    background-color: var(--op-white);
}

.info-table,
.info-pic-table tbody tr:nth-child(odd) {
    background-color: var(--op-white);
}

.bg-white {
    background-color: var(--op-white) !important;
}

/* 表格圖片樣式 */
.info-pic-table .product-img {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0.25rem;
}

/* left-to-right 表格 */
.ltr-table-container {
    width: 100%;
    max-width: calc(100% - 80px);
    margin: 20px auto;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-gray);
}

.ltr-row {
    display: grid;
    width: 100%;
    min-height: 40px;
    line-height: 1.5;
    color: #333;
    border-bottom: 1px solid var(--border-gray);
    grid-template-columns: repeat(3, 1fr);
}

.two {
    grid-template-columns: repeat(2, 1fr);
}

.ltr-row:last-child {
    border-bottom: none;
}

.ltr-cell {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border-right: 1px solid var(--border-gray);
}

.ltr-cell:last-child {
    border-right: none;
}

.ltr-cell-title {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    flex-shrink: 0;
    background-color: var(--sub-blue2);
    color: white;
    font-weight: bold;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-cell {
    flex-grow: 1;
    background-color: var(--op-white);
}

.ltr-cell-info {
    display: flex;
    flex-shrink: 0;
    background-color: var(--op-gray4);
    flex-direction: column;
    padding: 10px 16px;
    justify-content: center;
}

.ltr-row:first-child .ltr-cell-title {
    border-top-left-radius: 0.5rem;
}

.ltr-row:first-child .ltr-cell-info {
    border-top-right-radius: 0.5rem;
}

.ltr-row:last-child .ltr-cell-title {
    border-bottom-left-radius: 0.5rem;
}

.ltr-row:last-child .ltr-cell-info {
    border-bottom-right-radius: 0.5rem;
}

.ltr-row:first-child:last-child .ltr-cell-title {
    border-radius: 0.5rem 0 0 0.5rem;
}

.ltr-row:first-child:last-child .ltr-cell-info {
    border-radius: 0 0.5rem 0.5rem 0;
}

.ltr-row:first-child:last-child .title-cell {
    border-radius: 0;
}

.ltr-cell-file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px 16px;
    justify-content: center;
}

.ltr-cell-file a {
    display: block;
    text-decoration: none;
}

/* 1格表格內被分割 */
.td-center {
    display: flex;
    flex-direction: column;
}

/* 專門用於標題左、內容右的佈局 */
.info-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* 標題部分 (左側) */
.info-row .title {
    flex-shrink: 0;
    width: 5em;
    font-weight: 600;

    background-color: var(--sub-blue4);
    color: var(--sub-blue2);
    padding: 8px 10px;
    border-right: 1px solid #daeafe;
    border-radius: 0.5rem 0 0 0.5rem;

    display: flex;
    align-items: center;

    margin-right: 0;
}

/* 內容部分 (右側) */
.info-row .content {
    flex-grow: 1;
    flex-basis: 0;
    padding: 8px 10px;
    background-color: var(--op-white);
    border: 1px solid #daeafe;
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* RWD表格 */
.info-table-rwd {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    background-color: var(--op-white);
    border-radius: 0.5rem;
    overflow: hidden;
}

.info-table-rwd thead th {
    background-color: var(--sub-blue2);
    color: white;
    font-weight: 700;
    padding: 1rem 0.5rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.info-table-rwd thead th:last-child {
    border-right: none;
}

.info-table-rwd tbody th {
    background-color: var(--sub-blue4);
    color: var(--sub-blue2);
    font-weight: 600;
    padding: 16px;
    text-align: center;
    border: 1px solid #daeafe;
    width: 15%;
    white-space: nowrap;
}

.info-table-rwd td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

.info-table-rwd td a {
    color: #0056b3;
    text-decoration: underline;
    display: inline-block;
    word-break: break-all;
}

.info-table-rwd tbody tr:nth-child(even) {
    background-color: var(--op-gray4);
}

.info-table-rwd tbody tr:nth-child(odd) {
    background-color: var(--op-white);
}

.stakeholders thead tr:nth-child(2) th:nth-child(1) { width: 20%; }
.stakeholders thead tr:nth-child(2) th:nth-child(2) { width: 30%; }
.stakeholders thead tr:nth-child(2) th:nth-child(3) { width: 10%; }
.stakeholders thead tr:nth-child(2) th:nth-child(4) { width: 10%; }
.stakeholders thead tr:nth-child(2) th:nth-child(5) { width: 30%; }



@media (max-width: 1400px) {

    .info-table thead th,
    .info-pic-table thead th {
        white-space: normal;
    }

    .info-table.tablet-table,
    .info-table.tablet-table tbody,
    .info-table.tablet-table tr,
    .info-table.tablet-table tbody th,
    .info-table.tablet-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .info-table.tablet-table thead {
        display: none;
    }

    .info-table.tablet-table {
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        max-width: 100%;
    }

    .info-table.tablet-table tr {
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        background-color: #ffffff;
    }

    .info-table.tablet-table tbody th {
        text-align: center;
        background-color: var(--sub-blue2);
        color: white;
        font-size: 1.1rem;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0.5rem 0.5rem 0 0;
        padding: 10px;
    }

    .info-table.tablet-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        border-bottom: 1px solid #e5e7eb;
        border-right: none;
        border-left: none;
        position: relative;
        text-align: right;
        min-height: 40px;
    }

    .info-table.tablet-table td:last-child {
        border-bottom: none;
    }

    .info-table.tablet-table tbody tr:nth-child(even),
    .info-table.tablet-table tbody tr:nth-child(odd) {
        background-color: transparent;
    }

    .info-table.tablet-table td::before {
        content: attr(data-label);
        flex-basis: 50%;
        flex-shrink: 0;
        text-align: left;
        font-weight: 600;
        color: var(--sub-blue2);
        margin-right: 10px;
    }
}


@media (max-width: 1200px) {

    .info-table thead th,
    .info-pic-table thead th {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .info-table * {
        box-sizing: border-box;
    }

    .info-table,
    .info-pic-table,
    .info-table tbody,
    .info-pic-table tbody,
    .info-table tr,
    .info-pic-table tr,
    .info-table tbody th,
    .info-pic-table tbody th,
    .info-table td,
    .info-pic-table td {
        display: block;
    }

    .info-table {
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        max-width: 100%;
    }

    .info-pic-table {
        max-width: 100%;
    }

    .ltr-table-container {
        max-width: calc(100% - 10px);
    }

    .ltr-cell-info a {
        word-break: break-all;
    }

    .info-table.left td {
        display: table-row;
    }

    /* 隱藏頂部標題 */
    .info-table thead {
        display: none;
    }

    /* 每一行 (<tr>) 視為一個卡片區塊 */
    .info-table tr {
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        background-color: #ffffff;
    }

    /* 卡片頂部標題樣式 (<th>) */
    .info-table tbody th {
        text-align: center;
        background-color: var(--sub-blue2);
        color: white;
        font-size: 1.1rem;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0.5rem 0.5rem 0 0;
    }

    /* 數據格 (<td>) 樣式 */
    .info-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 16px;
        border-bottom: 1px solid #e5e7eb;
        border-right: none;
        position: relative;
        text-align: right;
    }

    .info-table-left {
        display: block !important;
    }

    /* 移除卡片最後一項的底線 */
    .info-table td:last-child {
        border-bottom: none;
    }

    /* 移除隔行變色 (卡片模式下使用 tr 的 background-color: #ffffff;) */
    .info-table tbody tr:nth-child(even),
    .info-table tbody tr:nth-child(odd) {
        background-color: transparent;
    }

    /* 注入頂部標題文字到每個數據格前 */
    .info-table td::before {
        content: attr(data-label);
        flex-basis: 50%;
        flex-shrink: 0;
        text-align: left;
        font-weight: 600;
        color: var(--sub-blue2);
        margin-right: 10px;
    }

    /* 表格圖片樣式 */
    .info-pic-table th {
        display: none;
    }

    .info-pic-table tr {
        margin-bottom: 20px;
    }

    /* 調整圖片所在的數據格 (<td>) 的樣式 */
    .info-pic-table td {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* 移除圖片格子的 ::before 標籤，讓圖片獨佔一行 */
    .info-pic-table td[data-label="產品圖片"]::before {
        content: none;
    }

    /* 重新定義 ::before 樣式，讓其他欄位的標籤顯示在內容的上方 */
    .info-pic-table td::before {
        content: attr(data-label);
        width: 100%;
        flex-basis: auto;
        flex-shrink: 0;
        text-align: center;
        font-weight: 700;
        color: var(--sub-blue2);
        margin-right: 0;
        margin-bottom: 5px;
    }

    .info-pic-table td {
        border: 1px solid #e5e7eb;
    }

    /* 調整圖片在卡片模式下的尺寸，使其不超過容器寬度 */
    .info-pic-table .product-img {
        max-width: 80%;
        height: auto;
    }

    .info-pic-table tbody tr:nth-child(even) {
        background-color: var(--op-white);
    }

    .ltr-row {
        display: grid;
        width: 100%;
        min-height: 40px;
        line-height: 1.5;
        color: #333;
        border-bottom: 1px solid var(--border-gray);
        grid-template-columns: repeat(1, 1fr);
    }

    .two {
        grid-template-columns: repeat(1, 1fr);
    }

    .ltr-row:first-child:last-child .ltr-cell-title {
        border-radius: 0.5rem 0 0 0;
    }

    /* RWD表格 */
    .info-table-rwd {
        width: 100%;
        margin: 10px 0;
        border-radius: 0;
        font-size: 15px;
    }

    .info-table-rwd thead th {
        padding: 10px 5px;
        white-space: normal;
        font-size: 1rem;
    }

    .info-table-rwd tbody th {
        width: 25%;
        min-width: 80px;
        padding: 10px;
        white-space: normal;
        font-size: 0.9rem;
    }

    .info-table-rwd td {
        padding: 10px;
        display: table-cell;
    }

    .info-table-rwd td a {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}