/* =============================================================
   rtp-list-layout.css  v1.0  2026-10-25
   Redmine: #424 #406
   Scope: .rtp-admin-main — 後台清單頁面篩選列 & 表格排版
   Purpose:
     (1) GET 篩選 form 與後續 div（表格容器）最少 16px 間距
     (2) 篩選控制項 label / input / select / button 統一 14px / 1.5
     (3) 清單表格 th / td 統一 14px / 1.5
   Not affected:
     登入頁 (不含 .rtp-admin-main)
     POST modal form
     TinyMCE (iframe，CSS 不穿越)
     checkbox / radio（評分/開關 input 排除於 input 規則外）
   Do not add global input/button rules outside form[method="get"].
   PMO 負責在共用版型加入 <link> 與 desktop/mobile 實機驗證。
   ============================================================= */

/* ------------------------------------------------------------------
   1. GET 篩選 form 與緊接 div（表格容器）最少 16px 間距
   Problem: section.space-y-3 只給 0.75rem (12px)；
            form[method="get"] 直接緊接 div.overflow-x-auto 時不足。
   Covers:
     - resources/views/admin/seasonalReport/_review_dashboard.blade.php
       (section.space-y-3 > form[method="get"] + div.overflow-x-auto)
     - resources/views/admin/rtp-regular-score/index.blade.php
       (section.space-y-4 > form[method="get"] + div.overflow-x-auto)
     - 其他 .rtp-admin-main 內同一 pattern 頁面
   Does NOT add double spacing to pages where form is wrapped in
   #search-form div (dc-units, dp-students 等)，因 form 非 div 的直接
   preceding sibling，CSS + combinator 不適用。
   ------------------------------------------------------------------ */
.rtp-admin-main form[method="get"] + div,
.rtp-admin-main form[method="GET"] + div {
    margin-top: 1rem; /* 16px */
}

/* ------------------------------------------------------------------
   2. GET 篩選列控制項字級統一 14px / line-height 1.5
   排除 checkbox / radio（避免影響勾選框視覺尺寸）。
   排除 type="button"（防止觸控展開按鈕等內部元件受影響）。
   ------------------------------------------------------------------ */

/* 2-a. label 文字 */
.rtp-admin-main form[method="get"] label,
.rtp-admin-main form[method="GET"] label {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

/* 2-b. 文字輸入框、日期欄、搜尋欄（排除 checkbox / radio） */
.rtp-admin-main form[method="get"] input:not([type="checkbox"]):not([type="radio"]),
.rtp-admin-main form[method="GET"] input:not([type="checkbox"]):not([type="radio"]) {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 2-c. 下拉選單 */
.rtp-admin-main form[method="get"] select,
.rtp-admin-main form[method="GET"] select {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 2-d. 篩選動作連結及送出按鈕（不動 type="button"） */
.rtp-admin-main form[method="get"] a,
.rtp-admin-main form[method="GET"] a,
.rtp-admin-main form[method="get"] button[type="submit"],
.rtp-admin-main form[method="GET"] button[type="submit"] {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ------------------------------------------------------------------
   3. 清單表格 th / td 字級統一 14px / 1.5
   子元素若有 .text-xs 等 Tailwind 字級類別，因其選擇器同等權重
   且樣式直接作用於元素本身（非繼承），不受此規則覆蓋。
   不設 overflow:hidden、white-space:nowrap 等，避免資料格擠切。
   ------------------------------------------------------------------ */
.rtp-admin-main table th,
.rtp-admin-main table td {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

/* #424/#367: reserve arrow space even when px-* utilities override form defaults. */
.rtp-admin-main select:not([multiple]):not([size]),
.rtp-admin-main select[size="1"] {
    min-width: 5rem;
    padding-right: 2.5rem !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right .75rem center !important;
    background-size: 1.25rem 1.25rem !important;
    background-repeat: no-repeat !important;
}

/* #424 final consistency: full-size filter/header actions; row actions stay compact. */
.rtp-admin-main form:is([method="get"], [method="GET"]) :is(select, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), button[type="submit"], a),
.rtp-admin-main .rtp-filter-actions > :is(button, a, select),
.rtp-admin-main .rtp-filter-action,
.rtp-admin-main .rtp-admin-primary-action {
    box-sizing: border-box;
    min-height: 40px;
    font-size: 14px;
    line-height: 21px;
}
.rtp-admin-main form:is([method="get"], [method="GET"]) :is(select, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), button[type="submit"]),
.rtp-admin-main .rtp-filter-actions > :is(button, select),
.rtp-admin-main .rtp-filter-action {
    height: 40px;
}
.rtp-admin-main .rtp-filter-actions > a,
.rtp-admin-main form:is([method="get"], [method="GET"]) a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rtp-admin-main :is(button, a).h-10 { font-size: 14px; line-height: 21px; }

.rtp-admin-main .rtp-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px !important;
}

/* Shared list rhythm; keep original columns, text alignment and workflow controls. */
.rtp-admin-main .rtp-list-table > :is(thead,tbody) > tr > :is(th,td) {
    padding:10px 12px!important;font-size:14px!important;line-height:22px!important;
}
.rtp-admin-main .rtp-list-table > thead > tr > th { font-weight:600; }
.rtp-admin-main .rtp-list-table > tbody > tr > td:not(.align-top):not([style*="vertical-align:top"]):not([style*="vertical-align: top"]) { vertical-align:middle; }
.rtp-admin-main .rtp-list-table td > form:has(> button, > input[type="submit"]) { display:inline-flex;align-items:center;gap:8px;margin:0; }
.rtp-admin-main .rtp-list-table td :is(a,p,label) { font-size:14px;line-height:22px; }
.rtp-admin-main .rtp-list-table small { font-size:12px!important;line-height:18px!important; }

.rtp-admin-main .rtp-list-actions { min-width:100px; }
.rtp-admin-main .rtp-list-actions > :is(a,button,form) { margin:3px 8px 3px 0; }
.rtp-admin-main .rtp-news-list { min-width:840px; }
.rtp-admin-main .rtp-news-list :is(th,td):nth-child(5) { min-width:104px;width:104px;white-space:nowrap; }
.rtp-admin-main .rtp-news-list :is(th,td):nth-child(6) { min-width:168px;width:168px; }
.rtp-admin-main .rtp-list-row-action { min-height:32px!important;padding:4px 8px!important;font-size:14px!important;line-height:22px!important; }

.rtp-admin-main .rtp-list-date > span { display:block;white-space:nowrap; }

.rtp-admin-main .rtp-qa-list h4 { margin:0 0 6px;font-size:16px;line-height:24px; }
.rtp-admin-main .rtp-qa-content { margin-top:12px;font-size:14px;line-height:22px; }
.rtp-admin-main .rtp-list-row-actions :is(a,button) { min-height:32px!important;padding:4px 8px!important;font-size:14px!important;line-height:22px!important; }
