/* 黑底導覽列：保持原本高度，將文字垂直與水平置中 */
#nav.navbar {
    display: flex !important;
    align-items: center !important; /* 垂直置中 */
    justify-content: center !important; /* 水平置中 */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 確保內部文字容器無多餘外邊距，完美對齊中線 */
#nav span {
    display: inline-block;
    line-height: normal !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================================================
   1. 報名資料欄位 (GridView4) 間距與說明文字美化
   =================================================== */
/* 上下欄位列的間距 */
.field-row {
    margin-bottom: 22px !important;
}

/* 欄位說明文字 (SingMemo) */
.field-memo,
.help-block {
    display: block;
    margin-top: 6px;
    margin-bottom: 2px;
    font-size: 14px !important; /* 適度放大字體提升可讀性 */
    color: #555555 !important; /* 深灰色，清晰易讀 */
    line-height: 1.5; /* 多行說明時維持舒適行高 */
}

/* ===================================================
   2. 下拉選單與報名場次欄位 (GridView1) 間距與對齊
   =================================================== */
/* 下拉選單列與列之間的上下間距，解決黏在一起的問題 */
.select-row {
    margin-bottom: 20px !important;
}

    /* 下拉選單 (ddlSelect2) 強制填滿 100% 寬度並統一高度 */
    .select-row select.form-control,
    .select-row .form-control,
    .col-sm-7 select.form-control,
    #ddlSelect2 {
        width: 100% !important;
        display: block;
    }
    /* 將下拉選單與選單區塊控制項背景顏色改為 #e3e2e2 */
    .select-row select.form-control,
    .select-row .form-control,
    #ddlSelect2,
    select.form-control {
        background-color: #e3e2e2 !important;
    }

/* 左側欄位標題與右側輸入框/下拉選單的垂直置中對齊 */
/* 左側欄位名稱向上微調 5px */
.control-label {
    padding-top: 0px !important; /* 從原先 7px 減為 2px，相當於向上移 5px */
    margin-top: -3px !important; /* 若微調不夠，可配合負 margin 精準上移 */
    margin-bottom: 0;
    line-height: 34px; /* 搭配輸入框預設高度 34px，能達到完美的垂直居中效果 */
}

/* 清除內部表格的多餘邊框與壓擠 */
#GridView1 table,
#GridView1 tr,
#GridView1 td {
    border: none !important;
}

/* ===================================================
   3. 條款聲明框與確認勾選區塊美化
   =================================================== */
/* 個人資料告知與同意勾選區塊：橫向排列、頂端對齊 */
.terms-check-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important; /* 勾選框與文字間保留 10px 空隙 */
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
}

    /* 修正 ASP.NET Checkbox 自動編譯出的 span 容器 */
    .terms-check-group span {
        display: inline-flex !important;
        align-items: flex-start !important;
    }

    /* 核心修改 1：讓 Checkbox 框體變大 (22px)、變粗，使用 accent-color 增強顯眼度 */
    .terms-check-group input[type="checkbox"] {
        width: 22px !important; /* 放大尺寸（原 18px） */
        height: 22px !important; /* 放大尺寸（原 18px） */
        margin-top: 1px !important; /* 微調垂直位置，精準對齊粗體字第一行中線 */
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        accent-color: #507CD1 !important; /* 勾選時顯示主題色，勾選符號更粗更清晰 */
        transform: scale(1.1); /* 稍微放強外框質感與視覺邊框粗細 */
    }

    /* 核心修改 2：將勾選框旁的文字標籤改為「加粗 (bold)」 */
    .terms-check-group label,
    .terms-check-group #lblProfile_12 {
        font-size: 16px !important; /* 適度微調字體大小 (原 15px) */
        font-weight: bold !important; /* 核心需求：文字變粗 */
        color: #222222 !important; /* 顏色加深，讓文字更顯眼 */
        margin: 0 !important;
        cursor: pointer !important;
        line-height: 1.5 !important;
    }

/* 讓帶有 required 類別的星號標籤顯示紅色 */
.control-label.required span.req-star,
.req-star {
    color: #ff0000 !important;
    font-weight: bold;
    margin-right: 2px;
}

/* 活動未開始/已結束....等使用...灰色按鈕形象標籤 (Status Badge) */
.btn-status-orange {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important; /* Bootstrap btn-lg 的預設內距 */
    font-size: 18px !important; /* 大按鈕字體大小 */
    font-weight: bold !important;
    line-height: 1.3333333 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    color: #555555 !important;
    background-color: #cccccc !important; /* 灰色背景 */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 6px !important; /* 與標準按鈕一致的微圓角 */
    box-sizing: border-box !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* 送出後的彈跳視窗視覺 */
.custom-modal-overlay {
    display: none; /* 預設隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑底 */
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

/* 500x300 送出後的彈跳視窗本體 */
.custom-modal-box {
    width: 500px;
    min-height: 260px; /* 改為最小高度，避免文字較多時溢出 */
    max-width: 90vw;
    max-height: 90vh;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 30px 25px 25px 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* 父層維持垂直排列 */
    justify-content: space-between;
    align-items: center;
    font-family: "Microsoft JhengHei", "微軟正黑體", Arial, sans-serif;
}

/* ===================================================
   彈跳視窗 CKEditor 內容 - 完全尊重後台對齊與顏色
=================================================== */

/* 1. 訊息容器：預設靠左 */
.modal-msg-custom {
    display: block !important;
    width: 100% !important;
    text-align: left;
    margin-bottom: 10px !important;
    font-size: 16px;
    line-height: 1.4 !important;
}

    /* 2. 內層 <p> 標籤：預設靠左 */
    .modal-msg-custom p,
    .modal-msg-custom div {
        display: block !important;
        width: 100% !important;
        text-align: left;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4 !important;
    }

    /* 3. 保留 <span> 與 <a> 樣式 */
    .modal-msg-custom span,
    .modal-msg-custom a {
        line-height: 1.4 !important;
    }

/* 虛線下方...黑色系統提示字區塊：強制佔滿 100% 寬度，獨佔下一行 */
.modal-msg-system {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    color: #333333 !important;
    font-weight: bold !important;
    font-size: 15pt !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
    border-top: 1px dashed #cccccc !important;
}

/* 彈跳視窗確定按鈕 */
.custom-modal-btn {
    width: 160px;
    height: 45px;
    background-color: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15pt;
    font-weight: bold;
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

    .custom-modal-btn:hover {
        background-color: #e07b00;
    }
