﻿/* === 下拉選單通用優化 === */
.hy-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: block;
    width: 100%;
    min-height: 2.75rem; /* 提升觸控可點範圍 */
    padding: .5rem 2.25rem .5rem .75rem; /* 預留右側箭頭空間 */
    border: 1px solid #dee2e6;
    border-radius: .5rem; /* 柔和圓角 */
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 18px 18px;
    font-size: 1rem;
    line-height: 1.25;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}


    /* 滑過 & 聚焦狀態（可視化焦點） */
    .hy-select:hover {
        border-color: #c7ced6;
    }

    .hy-select:focus {
        outline: none;
        border-color: #6ea8fe; /* 近似 Bootstrap focus 色 */
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
    }

    /* 失效/唯讀 */
    .hy-select:disabled,
    .hy-select[disabled] {
        color: #6c757d;
        background-color: #f8f9fa;
        border-color: #e9ecef;
        cursor: not-allowed;
        opacity: 1; /* 保持文字對比 */
    }

    /* 驗證狀態（沿用 Bootstrap 色彩邏輯） */
    .hy-select.is-valid {
        border-color: #198754;
        box-shadow: 0 0 0 .2rem rgba(25,135,84,.15);
    }

    .hy-select.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 .2rem rgba(220,53,69,.15);
    }

/* 尺寸工具類別 */
.hy-select-sm {
    min-height: 2.25rem;
    font-size: .95rem;
    padding-right: 2rem;
}

.hy-select-lg {
    min-height: 3rem;
    font-size: 1.05rem;
    padding-right: 2.5rem;
}

/* 深色/反相背景容器內的適配 */
.bg-dark .hy-select,
.hy-select.bg-dark {
    background-color: #212529;
    color: #e9ecef;
    border-color: #343a40;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

    .bg-dark .hy-select:focus,
    .hy-select.bg-dark:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.35);
    }

/* 高對比/Windows 強制色彩模式可用性 */
@media (forced-colors: active) {
    .hy-select {
        background-image: none; /* 交由系統箭頭呈現 */
    }
}

/* 行動裝置：避免字太擠 */
@media (max-width: 576px) {
    .hy-select {
        font-size: 1rem;
    }
}

.form-area .row.pb-2 {
    margin-bottom: 1rem; /* 區塊間距 */
    padding-bottom: 1rem; /* 底部 padding 加大 */
}

    .form-area .row.pb-2 label {
        margin-bottom: .5rem; /* label 與輸入框之間加一點空隙 */
    }


.form-check-label {
    cursor: pointer;
}

/* 表單區塊：加大垂直間距 */
.form-area .row.pb-2 {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

/* label 可點 */
.form-check-label {
    cursor: pointer;
}

/* 下拉選單優化 */
.hy-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    min-height: 2.75rem;
    padding: .5rem 2.25rem .5rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 18px 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .hy-select:hover {
        border-color: #c7ced6;
    }

    .hy-select:focus {
        outline: none;
        border-color: #6ea8fe;
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
    }

    .hy-select:disabled {
        color: #6c757d;
        background: #f8f9fa;
        border-color: #e9ecef;
        cursor: not-allowed;
    }

/* 場次選擇 checkbox 樣式 */
.session-checkbox-container {
    padding: 1rem;
}

    .session-checkbox-container .form-check {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        border-radius: .25rem;
        transition: background-color .15s ease;
    }

        .session-checkbox-container .form-check:hover {
            background-color: #f8f9fa;
        }

        .session-checkbox-container .form-check input[type="checkbox"]:checked + label {
            color: #0d6efd;
            font-weight: 500;
        }

        .session-checkbox-container .form-check input[type="checkbox"]:disabled + label {
            color: #6c757d;
            cursor: not-allowed;
        }

    .session-checkbox-container .form-check-label {
        margin-left: 0.5rem;
        line-height: 1.4;
    }

/*表格*/
table {
    width: 100% !important;
}

table {
    background-color: #f2f2f2;
}

    table th, table td {
        padding: 12px 15px;
        border: 1px solid #ddd;
        text-align: left;
    }

    table tr:nth-child(even) {
        background-color: #fafafa;
    }



/*表格RWD*/
/* 480px 以下才套用 */
@media (max-width: 480px) {
    table {
        width: 100% !important; /* 撐滿螢幕 */
        table-layout: fixed; /* 固定欄寬，避免超寬 */
        word-break: break-word; /* 長字斷行 */
    }

        table th,
        table td {
            padding: 6px 8px; /* 減少邊距，避免內容擠爆 */
            white-space: normal; /* 允許換行 */
        }
}
