/*
 * สไตล์เฉพาะของ เมืองกาญ.com (ส่วนที่ไม่ได้มากับ template ListOn)
 * แยกออกมาเป็นไฟล์กลาง แทนการเขียน <style> ซ้ำในทุกหน้า
 */

/* ---- ของเดิมที่เคยอยู่ใน <style> ของแต่ละหน้า ---- */
.mood-tag.active {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.btn-icon.is-favorite {
    color: var(--bs-danger) !important;
}

/* ---- แถบต้อนรับคนที่เคยเข้าเว็บแล้ว (daily-pick.js) ---- */
.welcome-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
    padding: .85rem 1.25rem;
    border: 1px solid rgba(var(--bs-primary-rgb), .18);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), .07), rgba(var(--bs-primary-rgb), .02));
}

@media (max-width: 767.98px) {
    .welcome-strip {
        border-radius: 1.25rem;
    }
}

.welcome-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    font-size: .875rem;
    white-space: nowrap;
}

/* ---- ร้านประจำวันนี้ (daily-pick.js) ---- */
.daily-pick-wrapper {
    border: 1px solid rgba(var(--bs-primary-rgb), .2);
    border-radius: 1.5rem;
    background-color: #fff;
    padding: 1.5rem;
}

.daily-pick-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), .1);
    font-size: 2.5rem;
    line-height: 1;
}

/* ---- หน้าย่านน่ากิน (areas.js) ---- */
.area-card-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), .1);
    font-size: 1.65rem;
    line-height: 1;
}

.area-index-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    padding: 1.25rem;
    background-color: #fff;
    transition: border-color .15s ease, transform .15s ease;
}

.area-index-card:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
}

/* ---- หน้า 404 / หน้าเนื้อหาแบบข้อความ ---- */
.legal-content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: .75rem;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p,
.legal-content li {
    color: var(--bs-secondary-color);
    line-height: 1.8;
}

/* ---- แบนเนอร์ขอความยินยอมเก็บสถิติ (consent-banner.js) ---- */
.consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1045; /* เหนือ navbar (1030) แต่ใต้ backdrop/modal ของ Bootstrap (1050/1055) — เดิม 1080 บังปุ่มใน popup รีวิว */
    max-width: 62rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    background-color: #fff;
    box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .18);
}

.consent-banner__text {
    flex: 1 1 22rem;
    font-size: .9rem;
    line-height: 1.6;
}

.consent-banner__actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 575.98px) {
    .consent-banner__actions {
        width: 100%;
        margin-left: 0;
    }

    .consent-banner__actions .btn {
        flex: 1 1 0;
    }
}

/* ---- อนิเมชันสล็อตของปุ่มสุ่มร้าน (random-pick.js) ---- */
.random-pick-reel {
    opacity: .65;
    animation: muangkan-reel .12s ease-out;
}

@keyframes muangkan-reel {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: .65; }
}

.random-pick-result {
    animation: muangkan-pop .35s cubic-bezier(.2, .9, .3, 1.3);
}

@keyframes muangkan-pop {
    from { transform: scale(.9); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

/* เคารพการตั้งค่าของผู้ใช้ที่ขอให้ลดการเคลื่อนไหว (accessibility) */
@media (prefers-reduced-motion: reduce) {
    .random-pick-reel,
    .random-pick-result {
        animation: none;
    }
}

/* ---- กำลังเป็นกระแสตอนนี้ (trending.js) ---- */
.trending-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-source {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 2; /* อยู่เหนือ stretched-link ของหัวข้อร้าน กันคลิกลิงก์อ้างอิงแล้วโดนพาไปหน้าร้านแทน */
}

/* ---- ปุ่ม "วางแผนการกิน" ในหน้า hero — ปุ่มหลัก (primary CTA) ของเว็บ ต้องเด่นกว่าปุ่ม/องค์ประกอบอื่นทั้งหมด ---- */
.hero-plan-eating-btn {
    font-size: 1.35rem;
    padding: 1.1rem 3rem;
    border: 3px solid #fff;
    letter-spacing: .02em;
    position: relative;
    z-index: 2;
    animation: muangkan-cta-pulse 2.2s ease-in-out infinite;
    transition: transform .2s ease, box-shadow .2s ease;
}

.hero-plan-eating-btn:hover,
.hero-plan-eating-btn:focus {
    transform: translateY(-3px) scale(1.04);
    color: #212529;
}

@keyframes muangkan-cta-pulse {
    0%, 100% {
        box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3), 0 0 0 0 rgba(255, 193, 7, .55);
    }
    50% {
        box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3), 0 0 0 14px rgba(255, 193, 7, 0);
    }
}

@media (min-width: 576px) {
    .hero-plan-eating-btn {
        font-size: 1.6rem;
        padding: 1.3rem 3.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-plan-eating-btn {
        animation: none;
    }
}
