/**
分頁頁籤補充
 */
.pagination-container {
    display: flex;
    align-items: center; /* 垂直置中 */
    justify-content: space-between; /* 水平對齊 */
}

.pagination {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.total-count {
    margin-left: 15px;
}

/**
sys-config參數設定補充，原底層style.css停用
 */
.content, .content input {
    font-size: 16px;
}

.con_main {
    background-color: #fcf8e3;
    /* support Safari, Chrome */
    -webkit-border-radius: 5px;
    /* support firefox */
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #dddddd;
    *height: 1%; /* IE6 IE7 */
}

.con_main:after {
    clear: left;
    content: '.';
    display: block;
    height: 0;
    overflow: hidden;
}

.con_main .table {
    border-top-width: 2px;
    border-bottom-width: 2px;
    border-top-style: solid;
    border-bottom-style: solid;
    border-top-color: #00a99d;
    border-bottom-color: #00a99d;
}

.con_main .table thead {
    background-color: #00a99d;
    border-right-width: 2px;
    border-left-width: 2px;
    border-right-style: solid;
    border-left-style: solid;
    border-right-color: #00a99d;
    border-left-color: #00a99d;
    color: #FFF;
}

.con_main .panel {
    margin-bottom: 0;
}

.con_main .panel-body p {
    padding: 12px;
}

.btn, input, select, .checkbox .checkbox-inline, .radioBtn .radio-inline {
    margin: 3px 3px 3px 0;
    vertical-align: middle;
}

.con_main form {
    padding-top: 12px;
}

.con_main .btn-box, .con_main .modal-btn, .con_main .annex-box, .con_main .con-box {
    padding: 6px 12px;
    /* support Safari, Chrome */
    -webkit-border-radius: 5px;
    /* support firefox */
    -moz-border-radius: 5px;
    border-radius: 5px;
    margin-bottom: 12px;
}

.con_main .modal-btn .btn {
    margin: 0;
}

.modal-content {
    border-radius: 5px;
}

.form-horizontal .checkbox, .form-horizontal .radio {
    padding-top: 0;
}

.form-horizontal .checkbox-inline, .form-horizontal .radio-inline {
    padding-top: 4px;
}

.form-inline label {
    padding-top: 8px;
}

.modal-body .form-horizontal {
    padding-left: 8px;
}

/**
freemarker marco betweenDateText重新設置
 */
.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表格欄位字體置中*/
table th, table td {
    text-align: center;
    vertical-align: middle;
}

/* 表格td欄位字體靠左*/
table td.text-not-middle {
    text-align: left;
    vertical-align: middle;
}

/* 必填提示樣式 */
.text-danger {
    display: inline-block; /* 依文字內容調整寬度 */
    margin-top: -3px; /* 調整提示訊息與欄位中間的間距 */
    background-color: #ff0000; /* 紅色背景 */
    color: #ffffff !important; /* 白色字體 */
    /*font-size: 12px; !* 字型大小 *!*/
    padding: 0 8px; /* 內距調整 */
    border-radius: 15px; /* 圓角效果，形成橢圓 */
    z-index: 2; /* 確保提示文字在上層 */
    white-space: nowrap; /* 防止文字換行 */
    pointer-events: none; /* 避免阻止輸入框操作 */
    line-height: normal; /* 確保文字垂直居中 */
}

/* 必填錯誤的紅色邊框 */
.error-border {
    border: 2px solid red !important;
    border-radius: 4px;
}

/* 針對附件按鈕的錯誤提示位置調整 */
.fileupload .text-danger {
    position: static;
}

.fileupload {
    display: flex;
    align-items: center;
}

/* 檢視畫面，部分欄位文字過多，改成滾輪方式滑動查看 */
.vertical-scrollable {
    max-height: 150px; /* 限制最大高度，可根據需求調整 */
    overflow-y: auto; /* 垂直方向出現滾動條 */
    overflow-x: hidden; /* 禁止水平滾動條 */
    word-wrap: break-word; /* 強制內容換行 */
    box-sizing: border-box; /* 確保 padding 和邊框不影響寬度 */
}

/* 針對 row 父容器內所有元素垂直置中 */
.row {
    align-items: center; /* 父容器垂直置中 */
}

/* ui-priority-secondary 日曆元件"返回今天按鈕"*/
.ui-priority-secondary {
    opacity: 1 !important;
    font-weight: bold !important;
}

/* 經費概算各個計算區塊 */
.table-container {
    width: 100%;
    border: 1px solid black;
    padding: 10px;
    font-family: Arial, sans-serif;
}

.table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.label {
    font-size: 16px;
}

.value {
    font-size: 20px;
    font-weight: bold;
}

.exceed-limit {
    color: red;
    font-size: 16px;
    font-weight: bold;
    margin-left: 10px;
}

.row-highlight {
    background-color: #f0f0f0;
    padding: 5px;
}

/* 讓自動儲存狀態浮動在右上角 */
#saveStatus {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    display: none; /* 預設隱藏 */
    z-index: 9999;
}

/* 頁籤滾輪設計 */
.nav-scroller {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: auto;
    scrollbar-color: #888 #f1f1f1;
}

/* table header 顏色 */
.table-header-color {
    background-color: #5C3780;
    color: white;;
}