/* test-news — หน้าข่าวทั้งหมด + ค้นหา (ใช้ร่วมกับการ์ดข่าว .pn2-card จาก pages/test-home/view.css) */
.pn2-news-page { padding: 40px 0 70px; }

/* ซ้าย */
.pn2-search { background: #f1f3f6; padding: 10px 10px 8px; margin-bottom: 26px; border-radius: 4px; }
.pn2-search-box { display: flex; background: #fff; border: 1px solid #e2e6ea; }
.pn2-search-box input { flex: 1; border: 0; padding: 8px 10px; min-width: 0; font-size: .95rem; outline: none; background: transparent; }
.pn2-search-box button { border: 0; background: transparent; color: #0b78d0; padding: 0 12px; }
.pn2-see-all { display: block; text-align: right; font-size: .9rem; color: #0b5ca8; margin-top: 2px; }
.pn2-side-card { background: #f4f5f7; border: 1px solid #e5e8ec; border-radius: 4px; padding: 14px; margin-bottom: 26px; }
.pn2-side-title { background: #eceef1; margin: -14px -14px 12px; padding: 9px 14px; font-size: .95rem; color: #374151; border-bottom: 1px solid #e5e8ec; }
.pn2-side-card label { display: block; font-size: .85rem; color: #6b7280; margin: 6px 0 2px; }
.pn2-side-card input[type=date] { width: 100%; border: 1px solid #d5dae0; padding: 6px 8px; font-size: .9rem; background: #fff; }
.pn2-go { margin-top: 12px; background: #17a2b8; border: 0; color: #fff; padding: 6px 14px; font-size: .9rem; border-radius: 2px; }
.pn2-go:hover { background: #128799; }
.pn2-side-block { margin-bottom: 22px; }
.pn2-side-h { font-size: 1.1rem; color: #1f2937; margin: 0 0 8px; padding-bottom: 6px; }
.pn2-type-list { list-style: none; margin: 0; padding: 0; }
.pn2-type-list li { border-bottom: 1px solid #e5e8ec; }
.pn2-type-list a { display: block; padding: 8px 0; color: #374151; text-decoration: none; font-size: .95rem; }
.pn2-type-list a small { color: #94a3b8; }
.pn2-type-list a:hover, .pn2-type-list li.on a { color: #0b5ca8; font-weight: 600; }

/* ช่องวันที่ พ.ศ. (ข้อความ + ปุ่มปฏิทิน) */
.pn2-date { position: relative; display: flex; border: 1px solid #d5dae0; background: #fff; }
.pn2-date-th { flex: 1; min-width: 0; border: 0 !important; padding: 6px 8px; font-size: .9rem; outline: none; background: transparent; width: auto !important; }
.pn2-date-th.is-invalid { background: #fff0f0; }
.pn2-date-btn { border: 0; border-left: 1px solid #e5e8ec; background: #f4f5f7; color: #0b5ca8; padding: 0 10px; }
.pn2-date-btn:hover { background: #e8f1fb; }

/* ขวา */
.pn2-res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pn2-res-head h2 { font-size: 1.7rem; margin: 0 0 4px; color: #111827; }
.pn2-res-sub { color: #374151; font-size: 1rem; }
.pn2-pager { display: inline-flex; list-style: none; margin: 0; padding: 0; border: 1px solid #d5dae0; border-radius: 3px; overflow: hidden; background: #fff; }
.pn2-pager li a { display: block; padding: 5px 12px; color: #0b5ca8; text-decoration: none; border-left: 1px solid #e5e8ec; font-size: .9rem; }
.pn2-pager li:first-child a { border-left: 0; }
.pn2-pager li.on a { background: #17a2b8; color: #fff; }
.pn2-pager li.off a { color: #b6bcc4; pointer-events: none; }
.pn2-pager li a:hover { background: #eef5ff; text-decoration: none; }
.pn2-pager li.on a:hover { background: #17a2b8; }
.pn2-pager-bottom { display: flex; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 767px) { .pn2-res-head h2 { font-size: 1.4rem; } .pn2-pager-bottom { justify-content: center; } }

/* ปฏิทิน พ.ศ. (เขียนเอง) */
.pn2-cal { position: absolute; z-index: 5000; display: none; width: 272px; background: #fff; border: 1px solid #d5dae0; border-radius: 8px; box-shadow: 0 10px 28px rgba(15, 23, 42, .18); padding: 10px; font-size: .9rem; }
.pn2-cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.pn2-cal-head select { flex: 1; min-width: 0; border: 1px solid #d5dae0; border-radius: 4px; padding: 3px 4px; font-size: .88rem; background: #fff; }
.pn2-cal-nav { border: 0; background: #eef2f8; color: #0b5ca8; width: 28px; height: 28px; border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.pn2-cal-nav:hover { background: #d9e6f5; }
.pn2-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.pn2-cal-dow { font-size: .78rem; color: #94a3b8; padding: 3px 0; }
.pn2-cal-day { border: 0; background: transparent; padding: 6px 0; border-radius: 6px; color: #1f2937; }
.pn2-cal-day:hover:not(:disabled) { background: #e4effb; }
.pn2-cal-day:disabled { color: #cbd5e1; cursor: default; }
.pn2-cal-day.today { box-shadow: inset 0 0 0 1px #17a2b8; }
.pn2-cal-day.on { background: #17a2b8; color: #fff; }
.pn2-cal-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 6px; border-top: 1px solid #eef0f3; }
.pn2-cal-foot button { border: 0; background: transparent; color: #0b5ca8; font-size: .88rem; }
