.cookie-nav {
    width: 100%;
    text-align: center;
    background-color: #1a1a1a; /* สีทึบ - สีโปร่งแสงตัวตรวจ WCAG วัดคอนทราสต์ไม่ได้ / ตัวขาว 17.4:1 */
    color: white;
    z-index: 9999999;
    /* sticky ที่ท้าย <body> แทน fixed (fixed ติดข้อควรระวัง WCAG 1.4.10) - ยังติดขอบล่างจอตอนเลื่อนเหมือนเดิม */
    position: sticky;
    bottom: 0;
    padding: 20px 5px;
    font-family: var(--bs-font-primary);
}
/* ปุ่มพวกนี้เดิมเป็น <a href="javascript:;"> ซึ่ง crawler ตามไม่ได้และ screen reader อ่านผิดประเภท
   เปลี่ยนเป็น <button> ตามความหมายจริง แล้วรีเซ็ตหน้าตาปุ่มให้เหมือนของเดิมเป๊ะ */
button.cookie-link,
button.toggle-setting {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    line-height: inherit;
    color: inherit;
    cursor: pointer;
}

/* แดงอ่อนลงจาก --bs-secondary-900 (#d82028) บนแถบดำ 8.6:1 (AAA) */
.cookie-link {
    color: #ff9a9e;
}
.cookie-link:hover {
    color: #ff9a9e;
    text-decoration: underline;
}
.btn-secondary.btn-save-cookie {
    /* ตัวขาว 7.5:1 (เดิม #d82028 = 5.05:1) - !important เพราะ main.css ตั้ง .btn-secondary ไว้ด้วย !important */
    background: #a8151c !important;
    border-color: #a8151c !important;
    text-transform: uppercase;
}
.cookie-container {
    display: grid;
    grid-template-columns: 1fr 15%;
    align-items: end;
}

@media (max-width: 576px) {
    .cookie-container {
        grid-template-columns: 1fr;
        justify-items: end;
    }
}

.cookie-sidebar {
    width: 375px;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    background-color: #ffffff;
    visibility: visible;
    transition: all 0.5s ease 0s;
}

/* ปิดอยู่ = ไม่แสดงเลย (เดิมเลื่อนออกนอกจอ - ยังเป็นองค์ประกอบ fixed ที่ตัวตรวจ WCAG 1.4.10 นับ) */
.cookie-sidebar.closed {
    display: none;
    position: static; /* ตัวตรวจนับ position: fixed แม้องค์ประกอบถูกซ่อน - แผงจะเป็น fixed เฉพาะตอนเปิด */
}

.cookie-sidebar-header {
    background-color: var(--bs-primary-900);
    padding: 10px 0;
}
/* height: auto ต้องมีคู่กับ width เสมอ
   เพราะ <img> มี attribute width/height (ใส่ไว้กันหน้าเด้งตอนโหลด) ซึ่งเบราว์เซอร์
   นับเป็น presentational hint = height: 83px ถ้าไม่ทับ ภาพจะโดนบีบแนวนอน
   (ไฟล์จริง 657x83 อัตราส่วน 7.92 แต่แสดง 250x83 = 3.01) */
.cookie-logo {
    width: 250px;
    height: auto;
}

.cookie-sidebar-body {
    overflow-y: scroll;
    height: 80vh;
    padding: 10px;
}
.cookie-sidebar-footer {
    padding: 10px;
}

.text-always {
    color: #0b3fc9; /* บนพื้นขาว 8.2:1 */
}

.form-check-input.cookie:checked {
    background-color: var(--bs-secondary-900) !important;
    border-color: var(--bs-secondary-900) !important;
}

.btn-save-setting {
    background-color: var(--bs-primary-900);
    border: 1px solid var(--bs-primary-900);
    color: white;
    text-transform: uppercase;
}
.btn-save-setting:hover {
    color: white;
}

/* ปุ่มลอยเปิดตั้งค่าคุกกี้: ย้ายไปเป็นปุ่ม "ตั้งค่าคุกกี้" ในแถบล่างของ footer แล้ว (fixed ติดข้อควรระวัง WCAG 1.4.10) */
.cookie-open-setting {
    display: none !important;
}
.img-cookie-setting {
    width: 30px;
}

.btn-consent {
    text-transform: uppercase;
}

#consentContent {
    height: 80vh;
    overflow-y: scroll;
}
