/*
 * Cookie banner (brown, floating at the foot of the screen) and the cookie settings dialog.
 */

.ck { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; padding: 24px 28px; border-radius: 24px; background: var(--plum); color: var(--white); box-shadow: 0 20px 50px rgba(86, 50, 57, .35); max-height: calc(100vh - 32px); overflow-y: auto; }
.ck-msg { flex: 1 1 560px; min-width: 0; display: flex; gap: 18px; align-items: flex-start; }
.ck-sun { width: 44px; height: 44px; flex: none; }
.ck-h { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--white); }
.ck-p { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.ck-p a { color: var(--gold); font-weight: 600; }
.ck-p a:hover { color: var(--white); }
.ck-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.ck-b { min-height: 48px; padding: 0 22px; font-size: 14px; }
.ck .btn--white { color: var(--brown); }
.ck-manage { background: transparent; border-color: var(--gold); color: var(--white); }
.ck-manage:hover { background: var(--gold); border-color: var(--gold); color: var(--brown); }
.ck-narrow { display: none; }

.ckd { width: calc(100% - 32px); max-width: 660px; max-height: calc(100% - 64px); margin: 48px auto auto; padding: 32px; border: 0; border-radius: 24px; background: var(--white); color: var(--brown); box-shadow: 0 30px 60px rgba(86, 50, 57, .35); overflow-y: auto; overscroll-behavior: contain; }
.ckd[open] { display: flex; flex-direction: column; gap: 18px; }
.ckd::backdrop { background: rgba(86, 50, 57, .55); }
.ckd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ckd-h { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--plum); }
.ckd-x { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--grey); background: transparent; color: var(--plum); cursor: pointer; }
.ckd-x:hover { border-color: var(--plum); background: var(--plum-7); }
.ckd-intro { font-size: 16px; line-height: 1.6; }
.ckd-cats { border-top: 1px solid var(--line); }
.ckd-cat { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ckd-cat-t { flex: 1; min-width: 0; }
.ckd-cat-t label { display: block; font-weight: 700; font-size: 16px; color: var(--plum); cursor: pointer; }
.ckd-cat-t p { margin-top: 4px; font-size: 15px; line-height: 1.55; }
.ckd-sw { display: flex; align-items: center; gap: 10px; flex: none; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--plum); }
.ckd-sw input { appearance: none; -webkit-appearance: none; position: relative; width: 48px; height: 28px; margin: 0; flex: none; border-radius: 999px; border: 1.5px solid var(--grey); background: var(--white); cursor: pointer; }
.ckd-sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--grey); }
.ckd-sw input:checked { border-color: var(--plum); background: var(--plum); }
.ckd-sw input:checked::after { left: 23px; background: var(--white); }
.ckd-sw input:disabled { cursor: not-allowed; opacity: .7; }
.ckd-sw input:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.ckd-state { min-width: 4.5em; }
.ckd-sw input:checked ~ .ckd-state .ckd-off, .ckd-sw input:not(:checked) ~ .ckd-state .ckd-on { display: none; }
.ckd-btns { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.ckd-status:empty { display: none; }
.ckd-status { font-weight: 600; color: var(--plum); }
.ckd-note { font-size: 15px; }
.ckd-note a { font-weight: 600; }

@media (max-width: 600px) {
	.ck { left: 8px; right: 8px; bottom: 8px; flex-direction: column; align-items: stretch; gap: 12px; padding: 22px 20px 20px; box-shadow: 0 -10px 40px rgba(86, 50, 57, .35); }
	.ck-msg { flex: none; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 12px; }
	.ck-msg > div { display: contents; }
	.ck-sun { width: 36px; height: 36px; }
	.ck-h { margin: 0; font-size: 22px; }
	.ck-p { grid-column: 1 / -1; font-size: 15px; line-height: 1.55; }
	.ck-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ck-b { padding: 0 12px; font-size: 13px; }
	.ck-manage { grid-column: 1 / -1; }
	.ck-wide { display: none; }
	.ck-narrow { display: inline; }
	.ckd { width: calc(100% - 16px); max-height: calc(100% - 32px); margin-top: 16px; padding: 24px 20px; gap: 14px; }
	.ckd-h { font-size: 28px; }
	.ckd-btns .btn { flex: 1 1 100%; }
}

/* The banner slides up, the settings dialog grows from 96%. */
@media (prefers-reduced-motion: no-preference) {
	.ck:not([hidden]) { animation: zzSlideUp .6s var(--ease) .4s both; }
	.ckd[open] { animation: zzPop .35s var(--ease) both; }
	.ckd[open]::backdrop { animation: zzFade .3s ease both; }
	.ckd-sw input::after { transition: left .2s var(--ease), background-color .2s; }
	.ckd-sw input { transition: background-color .2s, border-color .2s; }
}
