519 lines
14 KiB
CSS
519 lines
14 KiB
CSS
/* =========================================================
|
||
AT Transit shared polish — applied to all mockup pages
|
||
Loaded AFTER main-theme.css, BEFORE per-page <style>.
|
||
========================================================= */
|
||
|
||
/* ---------- Brand logo ---------- */
|
||
.mu-logo-img {
|
||
width: 44px;
|
||
height: 44px;
|
||
border-radius: 12px;
|
||
object-fit: cover;
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
|
||
}
|
||
|
||
/* ---------- Universal "cover" card pattern ---------- */
|
||
/* A card whose top region is a 16:10 image hero with a soft
|
||
gradient overlay and a label sitting on top. Used by route
|
||
cards (index) and stop cards (busStop) so duplicate stock
|
||
photos no longer look bolted on. */
|
||
.mu-cover {
|
||
position: relative;
|
||
aspect-ratio: 16 / 10;
|
||
background: linear-gradient(135deg, #eef1ff 0%, #f7f0ff 100%);
|
||
overflow: hidden;
|
||
}
|
||
.mu-cover > img {
|
||
position: absolute;
|
||
inset: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
transition: transform .45s ease;
|
||
}
|
||
.mu-card:hover .mu-cover > img,
|
||
.mu-cover-card:hover .mu-cover > img {
|
||
transform: scale(1.06);
|
||
}
|
||
.mu-cover::after {
|
||
content: "";
|
||
position: absolute;
|
||
inset: 0;
|
||
background:
|
||
linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .72) 100%);
|
||
pointer-events: none;
|
||
}
|
||
.mu-cover-tag {
|
||
position: absolute;
|
||
top: 12px;
|
||
left: 12px;
|
||
z-index: 1;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 5px 10px;
|
||
border-radius: 999px;
|
||
font-size: .72rem;
|
||
font-weight: 800;
|
||
letter-spacing: .02em;
|
||
background: rgba(255, 255, 255, .92);
|
||
color: #1f2a44;
|
||
backdrop-filter: blur(8px);
|
||
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
|
||
}
|
||
.mu-cover-title {
|
||
position: absolute;
|
||
left: 14px;
|
||
right: 14px;
|
||
bottom: 12px;
|
||
z-index: 1;
|
||
margin: 0;
|
||
color: #fff;
|
||
font-size: 1.05rem;
|
||
font-weight: 800;
|
||
line-height: 1.25;
|
||
text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
|
||
}
|
||
.mu-cover-title small {
|
||
display: block;
|
||
font-weight: 500;
|
||
font-size: .78rem;
|
||
opacity: .92;
|
||
margin-top: 2px;
|
||
}
|
||
.mu-cover.no-photo {
|
||
background:
|
||
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .35), transparent 55%),
|
||
linear-gradient(135deg, #7a4cc0 0%, #3071b8 100%);
|
||
}
|
||
.mu-cover.no-photo::after {
|
||
background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, .35) 100%);
|
||
}
|
||
.mu-cover.tone-purple { background: linear-gradient(135deg, #7a4cc0, #c084fc); }
|
||
.mu-cover.tone-sky { background: linear-gradient(135deg, #3071b8, #60a5fa); }
|
||
.mu-cover.tone-pink { background: linear-gradient(135deg, #bb3a78, #f472b6); }
|
||
.mu-cover.tone-mint { background: linear-gradient(135deg, #1f8765, #34d399); }
|
||
.mu-cover.tone-amber { background: linear-gradient(135deg, #c47b1d, #fbbf24); }
|
||
|
||
/* ---------- Index route cards (rebuilt) ---------- */
|
||
.mu-card {
|
||
overflow: hidden;
|
||
transition: transform .18s ease, box-shadow .18s ease;
|
||
}
|
||
.mu-card:hover {
|
||
transform: translateY(-3px);
|
||
box-shadow: 0 18px 36px rgba(15, 23, 42, .14);
|
||
}
|
||
.mu-card-head {
|
||
position: relative;
|
||
height: auto;
|
||
aspect-ratio: 16 / 10;
|
||
overflow: hidden;
|
||
}
|
||
.mu-card-head .mu-card-photo {
|
||
position: absolute;
|
||
inset: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
transition: transform .45s ease;
|
||
}
|
||
.mu-card:hover .mu-card-photo { transform: scale(1.06); }
|
||
.mu-card-head::after {
|
||
content: "";
|
||
position: absolute;
|
||
inset: 0;
|
||
background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .72) 100%);
|
||
}
|
||
.mu-card-head .mu-route-number {
|
||
position: absolute;
|
||
left: 14px;
|
||
bottom: 12px;
|
||
margin: 0;
|
||
color: #fff;
|
||
font-weight: 900;
|
||
font-size: 32px;
|
||
letter-spacing: .02em;
|
||
text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
|
||
z-index: 1;
|
||
}
|
||
.mu-card-head .mu-route-kind {
|
||
position: absolute;
|
||
top: 12px;
|
||
left: 12px;
|
||
z-index: 1;
|
||
padding: 4px 10px;
|
||
border-radius: 999px;
|
||
font-size: .7rem;
|
||
font-weight: 700;
|
||
background: rgba(255, 255, 255, .92);
|
||
color: #1f2a44;
|
||
backdrop-filter: blur(6px);
|
||
box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
|
||
}
|
||
.mu-card-head.no-photo {
|
||
background:
|
||
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 55%),
|
||
linear-gradient(135deg, #7a4cc0 0%, #3071b8 100%);
|
||
}
|
||
.mu-card-head.no-photo.bg-purple { background: linear-gradient(135deg, #7a4cc0, #c084fc); }
|
||
.mu-card-head.no-photo.bg-sky { background: linear-gradient(135deg, #3071b8, #60a5fa); }
|
||
.mu-card-head.no-photo.bg-pink { background: linear-gradient(135deg, #bb3a78, #f472b6); }
|
||
.mu-card-head.no-photo.bg-mint { background: linear-gradient(135deg, #1f8765, #34d399); }
|
||
|
||
/* ---------- BusStop: integrated stop cards (no more
|
||
disjoint thumbnails) ---------- */
|
||
.mu-stop-grid li.mu-stop-cell {
|
||
list-style: none;
|
||
border-radius: 18px;
|
||
overflow: hidden;
|
||
box-shadow: 0 10px 24px rgba(63, 43, 94, .08);
|
||
border: 1px solid rgba(231, 224, 246, .95);
|
||
background: #fff;
|
||
display: flex;
|
||
flex-direction: column;
|
||
transition: transform .18s ease, box-shadow .18s ease;
|
||
}
|
||
.mu-stop-grid li.mu-stop-cell:hover {
|
||
transform: translateY(-3px);
|
||
box-shadow: 0 18px 36px rgba(63, 43, 94, .14);
|
||
}
|
||
.mu-stop-cell .mu-stop-card {
|
||
padding: 16px 18px 18px;
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
background: transparent;
|
||
}
|
||
|
||
/* ---------- Rich shared footer ---------- */
|
||
.mu-site-footer {
|
||
margin-top: 48px;
|
||
background:
|
||
radial-gradient(circle at 0% 0%, rgba(122, 76, 192, .35), transparent 35%),
|
||
radial-gradient(circle at 100% 10%, rgba(48, 113, 184, .35), transparent 35%),
|
||
linear-gradient(180deg, #1a1830 0%, #0f1126 100%);
|
||
color: #cfd5ec;
|
||
padding: 48px 0 0;
|
||
}
|
||
.mu-site-footer .mu-container {
|
||
max-width: 1200px;
|
||
margin: 0 auto;
|
||
padding: 0 24px;
|
||
}
|
||
.mu-footer-grid {
|
||
display: grid;
|
||
grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
|
||
gap: 28px;
|
||
}
|
||
.mu-footer-brand {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
.mu-footer-brand-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
.mu-footer-brand-row img {
|
||
width: 48px;
|
||
height: 48px;
|
||
border-radius: 12px;
|
||
background: #fff;
|
||
padding: 4px;
|
||
object-fit: contain;
|
||
}
|
||
.mu-footer-brand-row strong {
|
||
display: block;
|
||
color: #fff;
|
||
font-size: 1.05rem;
|
||
font-weight: 800;
|
||
letter-spacing: .01em;
|
||
}
|
||
.mu-footer-brand-row span {
|
||
display: block;
|
||
color: #9aa3c3;
|
||
font-size: .82rem;
|
||
margin-top: 2px;
|
||
}
|
||
.mu-footer-brand p.about {
|
||
margin: 0;
|
||
color: #b6bdda;
|
||
font-size: .88rem;
|
||
line-height: 1.6;
|
||
}
|
||
.mu-footer-col h4 {
|
||
margin: 0 0 14px;
|
||
color: #fff;
|
||
font-size: .9rem;
|
||
font-weight: 800;
|
||
letter-spacing: .03em;
|
||
text-transform: uppercase;
|
||
}
|
||
.mu-footer-col ul {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
.mu-footer-col ul a {
|
||
color: #cfd5ec;
|
||
text-decoration: none;
|
||
font-size: .9rem;
|
||
transition: color .15s ease;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
.mu-footer-col ul a:hover { color: #fff; }
|
||
.mu-footer-col ul a::before {
|
||
content: "›";
|
||
color: #7a4cc0;
|
||
font-weight: 800;
|
||
}
|
||
.mu-footer-contact a,
|
||
.mu-footer-contact span {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
color: #cfd5ec;
|
||
text-decoration: none;
|
||
font-size: .88rem;
|
||
}
|
||
.mu-footer-contact .row { margin-bottom: 8px; }
|
||
|
||
/* ---------- Sponsor strip inside footer ---------- */
|
||
.mu-footer-sponsors {
|
||
margin-top: 36px;
|
||
padding-top: 28px;
|
||
border-top: 1px solid rgba(255, 255, 255, .08);
|
||
}
|
||
.mu-footer-sponsors h4 {
|
||
margin: 0 0 6px;
|
||
color: #fff;
|
||
font-size: .95rem;
|
||
font-weight: 800;
|
||
}
|
||
.mu-footer-sponsors p.lead {
|
||
margin: 0 0 18px;
|
||
color: #9aa3c3;
|
||
font-size: .85rem;
|
||
}
|
||
.mu-sponsor-strip {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||
gap: 12px;
|
||
}
|
||
.mu-sponsor-tile {
|
||
background: #fff;
|
||
border-radius: 12px;
|
||
padding: 14px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
aspect-ratio: 5 / 3;
|
||
transition: transform .15s ease, box-shadow .15s ease;
|
||
border: 1px solid rgba(255, 255, 255, .04);
|
||
}
|
||
.mu-sponsor-tile:hover {
|
||
transform: translateY(-3px);
|
||
box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
|
||
}
|
||
.mu-sponsor-tile img {
|
||
max-width: 84%;
|
||
max-height: 70%;
|
||
object-fit: contain;
|
||
filter: grayscale(.1);
|
||
transition: filter .2s ease;
|
||
}
|
||
.mu-sponsor-tile:hover img { filter: grayscale(0); }
|
||
|
||
/* ---------- Footer bottom bar ---------- */
|
||
.mu-footer-bottom {
|
||
margin-top: 36px;
|
||
padding: 18px 0 22px;
|
||
border-top: 1px solid rgba(255, 255, 255, .08);
|
||
text-align: center;
|
||
}
|
||
.mu-footer-bottom p {
|
||
margin: 0;
|
||
color: #8d96b8;
|
||
font-size: .82rem;
|
||
letter-spacing: .02em;
|
||
}
|
||
.mu-footer-bottom .pill {
|
||
display: inline-block;
|
||
margin-left: 10px;
|
||
padding: 2px 10px;
|
||
border-radius: 999px;
|
||
background: rgba(122, 76, 192, .25);
|
||
color: #d8c7ff;
|
||
font-size: .72rem;
|
||
font-weight: 700;
|
||
}
|
||
|
||
/* Hide legacy thin footer when shared rich footer is present */
|
||
body:has(.mu-site-footer) .mu-footer { display: none; }
|
||
|
||
@media (max-width: 980px) {
|
||
.mu-footer-grid { grid-template-columns: 1fr 1fr; }
|
||
}
|
||
@media (max-width: 640px) {
|
||
.mu-footer-grid { grid-template-columns: 1fr; }
|
||
.mu-site-footer { padding: 36px 0 0; }
|
||
}
|
||
|
||
/* =========================================================
|
||
Icon system — Lucide (MIT) — ใช้ <svg class="ic"><use href="#ic-NAME"/></svg>
|
||
sprite: partials/icons-sprite.svg | credit: ui/credits.html
|
||
========================================================= */
|
||
.ic {
|
||
width: 1em;
|
||
height: 1em;
|
||
display: inline-block;
|
||
vertical-align: -0.125em;
|
||
fill: none;
|
||
stroke: currentColor;
|
||
stroke-width: 2;
|
||
stroke-linecap: round;
|
||
stroke-linejoin: round;
|
||
flex-shrink: 0;
|
||
}
|
||
.ic--lg { width: 1.4em; height: 1.4em; }
|
||
|
||
/* ---------- Search field (input + icon ข้างหน้า) ---------- */
|
||
.mu-search-field {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
flex: 1;
|
||
min-width: 220px;
|
||
}
|
||
.mu-search-field .ic {
|
||
position: absolute;
|
||
left: 12px;
|
||
color: #6f7b95;
|
||
pointer-events: none;
|
||
}
|
||
.mu-search-field input {
|
||
width: 100%;
|
||
padding: 10px 12px 10px 38px;
|
||
}
|
||
|
||
/* ---------- ปุ่มสลับภาษา (ไทย / EN) ---------- */
|
||
.mu-lang-switch {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
background: #f0edf7;
|
||
border: 1px solid #e4dcf2;
|
||
border-radius: 999px;
|
||
padding: 3px;
|
||
flex-shrink: 0;
|
||
}
|
||
.mu-lang-btn {
|
||
border: 0;
|
||
background: transparent;
|
||
color: #6d28d9;
|
||
font-family: inherit;
|
||
font-weight: 700;
|
||
font-size: .72rem;
|
||
line-height: 1;
|
||
padding: 6px 10px;
|
||
border-radius: 999px;
|
||
cursor: pointer;
|
||
transition: background .15s ease, color .15s ease;
|
||
}
|
||
.mu-lang-btn:hover { color: #5b21b6; }
|
||
.mu-lang-btn.active {
|
||
background: #fff;
|
||
color: #7a4cc0;
|
||
box-shadow: 0 1px 4px rgba(63, 43, 94, .18);
|
||
}
|
||
|
||
/* ============================================================
|
||
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
|
||
.mu-btn อยู่ที่นี่ (ไม่ใช่ใน partial) → หน้าไหนก็ได้สไตล์เดียวกัน
|
||
============================================================ */
|
||
.mu-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 6px;
|
||
min-height: 44px;
|
||
padding: 10px 18px;
|
||
border-radius: 12px;
|
||
font-family: inherit;
|
||
font-weight: 700;
|
||
font-size: .85rem;
|
||
line-height: 1;
|
||
text-decoration: none;
|
||
border: 1px solid transparent;
|
||
cursor: pointer;
|
||
transition: box-shadow .15s ease, transform .1s ease, background .15s ease, border-color .15s ease;
|
||
}
|
||
.mu-btn:active { transform: translateY(1px); }
|
||
.mu-btn.primary {
|
||
background: linear-gradient(135deg, #a855f7, #7c3aed);
|
||
color: #fff;
|
||
box-shadow: 0 8px 18px rgba(124, 58, 237, .25);
|
||
}
|
||
.mu-btn.primary:hover { box-shadow: 0 10px 22px rgba(124, 58, 237, .35); }
|
||
.mu-btn.ghost {
|
||
background: #fff;
|
||
border-color: #e7e2f6;
|
||
color: #5b3b71;
|
||
box-shadow: 0 2px 8px rgba(63, 43, 94, .05);
|
||
}
|
||
.mu-btn.ghost:hover { border-color: #d8c9f2; background: #faf7ff; }
|
||
|
||
/* select แบบโมเดิร์น — custom chevron แทนลูกศร native (prefix #view ชนะ partial style) */
|
||
#view .mu-toolbar select {
|
||
appearance: none;
|
||
-webkit-appearance: none;
|
||
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a4cc0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(180deg, #fff, #f8fbff);
|
||
background-repeat: no-repeat;
|
||
background-position: right 12px center;
|
||
padding-right: 38px;
|
||
cursor: pointer;
|
||
}
|
||
#view .mu-toolbar select:hover { border-color: #c8b4ec; }
|
||
#view .mu-toolbar input:hover { border-color: #c8b4ec; }
|
||
|
||
/* focus ring อันเดียวกันทั้งฟอร์ม — มองเห็นชัดตอน tab (a11y) */
|
||
#view .mu-toolbar input:focus-visible,
|
||
#view .mu-toolbar select:focus-visible,
|
||
#view .mu-toolbar .mu-btn:focus-visible {
|
||
outline: 2px solid #7a4cc0;
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
/* ---------- ปุ่มติดตั้งแอป (PWA — inject จาก pwa.js) ---------- */
|
||
.mu-install-btn {
|
||
position: fixed;
|
||
bottom: 20px;
|
||
right: 20px;
|
||
z-index: 100;
|
||
display: none; /* โผล่เมื่อ beforeinstallprompt เท่านั้น */
|
||
align-items: center;
|
||
gap: 8px;
|
||
min-height: 48px;
|
||
padding: 12px 20px;
|
||
border: none;
|
||
border-radius: 999px;
|
||
cursor: pointer;
|
||
font-family: inherit;
|
||
font-size: .95rem;
|
||
font-weight: 700;
|
||
color: #fff;
|
||
background: linear-gradient(135deg, #a855f7, #7c3aed);
|
||
box-shadow: 0 10px 24px rgba(124, 58, 237, .35);
|
||
transition: transform .15s ease;
|
||
}
|
||
.mu-install-btn:active { transform: translateY(1px); }
|
||
.mu-install-btn svg { width: 20px; height: 20px; }
|