/*
Theme Name: Tivrela
Theme URI: https://tivrela.com
Author: Tivrela
Description: ธีมเว็บเที่ยว "วันนี้ไปไหนดี" — จัดอันดับสถานที่ตามอากาศ ฝน ฝุ่น และวันหยุด พร้อมหน้าสถานที่แบบ "เช็กก่อนไป" และปฏิทินรายเดือน
Version: 1.1.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: tivrela
*/

:root{
  --tv-ink:#16211C; --tv-ink2:#39443E; --tv-mute:#4A5650; --tv-mute2:#5B6761;
  --tv-bg:#F3F5F1; --tv-card:#FFFFFF; --tv-line:#DCE2DA; --tv-line2:#C9D1C7;
  --tv-green:#1F5C46; --tv-green-d:#123B2C; --tv-ph:#DDE5DA;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--tv-bg);color:var(--tv-ink);font-family:'IBM Plex Sans Thai',sans-serif}
a{color:var(--tv-green)} a:hover{color:var(--tv-green-d)}
h1,h2,.tv-display{font-family:'Anuphan',sans-serif}
button{font-family:inherit}
.tv-sr{position:absolute;left:-9999px}
.tv-wrap{max-width:1120px;margin:0 auto;padding-left:16px;padding-right:16px}

/* header */
.tv-header{background:#fff;border-bottom:1px solid var(--tv-line)}
.tv-header .tv-wrap{padding-top:14px;padding-bottom:14px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px}
.tv-logo{font-family:'Anuphan',sans-serif;font-weight:700;font-size:22px;text-decoration:none;color:var(--tv-ink);display:flex;align-items:center;gap:8px}
.tv-logo img{max-height:36px;width:auto}
.tv-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 20px;font-size:15px}
.tv-nav a{text-decoration:none;padding:10px 0;display:block;color:var(--tv-mute)}
.tv-nav .current-menu-item>a,.tv-nav a.is-current{color:var(--tv-green);font-weight:600}
.tv-tools{flex:1 1 220px;display:flex;justify-content:flex-end;align-items:center;gap:8px}
.tv-search{width:100%;max-width:260px;height:44px;padding:0 14px;border:1px solid var(--tv-line2);border-radius:10px;font-family:inherit;font-size:15px;background:#F8FAF7}
.tv-lang{display:flex;border:1px solid var(--tv-line2);border-radius:10px;overflow:hidden;flex:none}
.tv-lang button{min-width:48px;min-height:44px;border:0;background:#fff;color:var(--tv-ink);font-weight:600;cursor:pointer}
.tv-lang button[aria-pressed="true"]{background:var(--tv-ink);color:#fff}
.tv-en-banner{background:#E4EEE8;font-size:14px}
.tv-en-banner .tv-wrap{padding-top:10px;padding-bottom:10px}
.tv-en-banner[hidden]{display:none}

/* layout */
.tv-main{padding-top:28px;padding-bottom:64px;display:flex;flex-direction:column;gap:24px}
.tv-h1{margin:0;font-size:40px;line-height:1.15;font-weight:700}
.tv-h2{margin:0;font-size:22px}
.tv-lead{margin:0;font-size:17px;line-height:1.6;color:var(--tv-ink2)}
.tv-small{font-size:13px;color:var(--tv-mute2)}
.tv-card{background:#fff;border:1px solid var(--tv-line);border-radius:16px;padding:20px}
.tv-col{display:flex;flex-direction:column}
.tv-row{display:flex;flex-wrap:wrap}
.tv-between{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px}
.tv-grid{display:grid;gap:12px}
.tv-ph{background:var(--tv-ph);display:flex;align-items:center;justify-content:center;color:var(--tv-mute);font-size:14px}
.tv-kv{display:flex;justify-content:space-between;gap:12px;font-size:15px}
.tv-kv>span:first-child{color:var(--tv-mute)}
.tv-kv>span:last-child{font-weight:600;text-align:right}
.tv-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:10px;background:var(--tv-green);color:#fff;text-decoration:none;font-weight:600;border:1px solid var(--tv-green);cursor:pointer;font-size:15px}
.tv-btn:hover{color:#fff;background:var(--tv-green-d)}
.tv-btn-o{background:#fff;color:var(--tv-green)}
.tv-btn-o:hover{background:#EEF4F0;color:var(--tv-green)}
.tv-pill{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;font-size:13px;font-weight:600}

/* day picker */
.tv-days{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
.tv-day{flex:0 0 auto;min-width:84px;min-height:72px;border-radius:12px;border:2px solid var(--tv-line);background:#fff;color:var(--tv-ink);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 8px}
.tv-day .l{font-size:13px}
.tv-day .d{font-family:'Anuphan',sans-serif;font-size:20px;font-weight:700}
.tv-day[aria-pressed="true"]{background:var(--tv-green);border-color:var(--tv-green);color:#fff}
.tv-days.alt .tv-day{min-height:84px;background:var(--tv-bg);border-color:transparent}
.tv-days.alt .tv-day .l{color:var(--tv-mute)}
.tv-days.alt .tv-day[aria-pressed="true"]{background:#fff;border-color:var(--tv-green);color:var(--tv-ink)}
.tv-tag{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:600}
.tv-tag i{width:8px;height:8px;border-radius:50%;display:block}

/* chips */
.tv-filters{display:flex;flex-direction:column;gap:12px;padding:16px}
.tv-chiprow{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tv-chiprow>span{font-size:14px;color:var(--tv-mute);min-width:72px}
.tv-chip{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--tv-line2);background:#fff;color:var(--tv-ink);font-size:15px;cursor:pointer}
.tv-chip[aria-pressed="true"]{background:var(--tv-green);border-color:var(--tv-green);color:#fff}

/* place cards */
.tv-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.tv-place{background:#fff;border:1px solid var(--tv-line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px}
.tv-rank{width:40px;height:40px;border-radius:50%;background:var(--tv-ink);color:#fff;font-family:'Anuphan',sans-serif;font-weight:700;font-size:18px;display:flex;align-items:center;justify-content:center;flex:none}
.tv-score{font-family:'Anuphan',sans-serif;font-size:26px;font-weight:700;line-height:1}
.tv-score small{font-size:14px;color:var(--tv-mute)}
.tv-empty{background:#fff;border:1px dashed #A9B6A6;border-radius:16px;padding:28px;text-align:center;color:var(--tv-ink2)}

.tv-cta{background:var(--tv-green);color:#fff;border-radius:16px;padding:22px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.tv-cta .tv-btn{background:#fff;color:var(--tv-green);border-color:#fff;min-height:48px;padding:0 20px;font-size:16px}

/* place page */
.tv-hero{display:flex;flex-wrap:wrap;gap:24px;align-items:stretch}
.tv-hero>div{flex:999 1 520px;min-width:0;display:flex;flex-direction:column;gap:16px}
.tv-cover{height:300px;border-radius:16px;border:1px dashed #A9B6A6;overflow:hidden}
.tv-cover img{width:100%;height:100%;object-fit:cover;display:block}
.tv-sum{flex:1 1 300px;background:var(--tv-green);color:#fff;border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:14px}
.tv-verdict{border-radius:14px;padding:18px 20px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px}
.tv-vicon{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none}
.tv-meter{min-width:104px;border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.tv-meter b{font-family:'Anuphan',sans-serif;font-size:24px}
.tv-box{background:var(--tv-bg);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:10px}
.tv-box-o{border:1px solid var(--tv-line);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:10px}
.tv-months{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:8px}
.tv-month{min-height:64px;border-radius:10px;border:3px solid transparent;font-family:'Anuphan',sans-serif;font-size:17px;font-weight:600;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.tv-month small{font-family:'IBM Plex Sans Thai',sans-serif;font-size:12px;font-weight:500}
.tv-month[aria-pressed="true"]{border-color:#C2571A}
.tv-reports{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px}
.tv-report{flex:0 0 220px;border:1px solid var(--tv-line);border-radius:12px;overflow:hidden}
.tv-near{display:flex;flex-wrap:wrap;gap:8px}
.tv-near a{display:flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;background:#fff;border:1px solid var(--tv-line2);text-decoration:none;color:var(--tv-ink)}
.tv-content{line-height:1.7;font-size:17px}
.tv-content img{max-width:100%;height:auto}

.tv-footer{border-top:1px solid var(--tv-line);background:#fff}
.tv-footer .tv-wrap{padding-top:20px;padding-bottom:20px;font-size:13px;line-height:1.6;color:var(--tv-mute2)}

@media (max-width:600px){ .tv-h1{font-size:30px} .tv-list{grid-template-columns:1fr} }
