/**
 * EIP 欄位操作引導樣式
 * Toggle 開關、問號按鈕、欄位容器的統一樣式
 *
 * @version 1.0.0
 */

/* ===== Toggle 開關容器 ===== */
.field-guide-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

/* 隱藏原生 checkbox */
.field-guide-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* ===== 滑塊（OFF 狀態：灰色） ===== */
.field-guide-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 22px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* 圓形滑塊旋鈕 */
.field-guide-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

/* ===== ON 狀態：綠色 #28a745 ===== */
.field-guide-switch input:checked + .field-guide-slider {
    background-color: #28a745;
}

/* ON 狀態旋鈕滑動至右側 */
.field-guide-switch input:checked + .field-guide-slider::before {
    transform: translateX(18px);
}

/* ===== 問號按鈕 ===== */
.btn-field-help {
    flex-shrink: 0;
    cursor: help;
    margin-top: 0.25rem;
    /* 移除邊框與背景，使其為純圖標樣式 */
    border: none !important;
    background-color: transparent !important;
    color: #6c757d; /* 灰色圖標 */
}

/* hover 與 focus 狀態：保持透明背景，不觸發 Bootstrap 預設白色 */
.btn-field-help:hover,
.btn-field-help:focus,
.btn-field-help:active {
    background-color: transparent !important;
    color: #495057; /* hover 時稍深 */
    border: none !important;
    box-shadow: none !important;
}

/* ===== 欄位 + 問號按鈕 flex 容器 ===== */
.field-with-help {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.field-with-help .form-control,
.field-with-help .form-select {
    flex: 1;
}

/* ===== list/form 操作說明 共用樣式 ===== */
/* 用於 Page/Index 與 Form 的說明按鈕與區塊樣式 */
.btn-outline-secondary.form-help-block,
.btn-field-help,
.btn-field-help.btn-outline-secondary {
    border: none !important;
    background-color: transparent !important;
    color: var(--text-muted, #6c757d) !important;
    padding: 0.15rem 0.35rem;
}
.btn-field-help:hover,
.btn-field-help:focus {
    color: var(--text-primary, #495057) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 讓說明按鈕與說明區塊能以 flex 對齊（若需要） */
.form-help-block + .collapse,
.field-with-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 可供 page-level tour 專用微調（覆蓋各站台特例） */
.tour-step-highlight {
    outline: 2px solid rgba(13,110,253,0.12);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.06);
}

/* ===== Help 頁章節標題（fw-bold）視覺強化 ===== */
.feature-help-page section h5.fw-bold {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #eef4ff 0%, #f7faff 100%);
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.feature-help-page section h5.fw-bold::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
    flex: 0 0 auto;
}

.feature-help-page .card .card-header.fw-bold {
    background: #f8fafc;
    border: 1px solid #dbe7ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    letter-spacing: 0.01em;
}
