/**
 * MedicAlert cookie consent — banner, preferences modal, re-open button.
 * Brand colours are hardcoded (red #C8161D, navy #0E4C84) so the banner looks
 * right regardless of theme.
 */
.ma-cc {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100000;
	background: #fff; color: #26303A; border-radius: 14px;
	box-shadow: 0 20px 50px -12px rgba(15, 32, 52, .45); border: 1px solid #E6EBF0;
	max-width: 1040px; margin: 0 auto;
	font-family: inherit;
}
.ma-cc__inner { display: flex; align-items: center; gap: 22px; padding: 18px 22px; flex-wrap: wrap; }
.ma-cc__text { flex: 1 1 340px; min-width: 260px; }
.ma-cc__text strong { display: block; font-size: 16px; font-weight: 800; color: #0E4C84; margin-bottom: 4px; }
.ma-cc__text p { margin: 0; font-size: 14px; line-height: 1.55; color: #4A555F; }
.ma-cc__text a { color: #C8161D; font-weight: 700; text-decoration: underline; }
.ma-cc__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ma-cc__btn {
	appearance: none; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14px;
	padding: 11px 18px; border-radius: 9px; line-height: 1; transition: background .14s, color .14s, border-color .14s;
}
.ma-cc__btn--ghost { background: #fff; color: #35404A; border: 1.5px solid #CBD5DE; }
.ma-cc__btn--ghost:hover { border-color: #0E4C84; color: #0E4C84; }
.ma-cc__btn--accept { background: #C8161D; color: #fff; }
.ma-cc__btn--accept:hover { background: #A6131A; }

/* Preferences modal */
.ma-cc-modal { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ma-cc-modal__backdrop { position: absolute; inset: 0; background: rgba(12, 26, 43, .55); }
.ma-cc-modal__panel {
	position: relative; background: #fff; border-radius: 16px; max-width: 560px; width: 100%;
	max-height: 88vh; overflow-y: auto; padding: 26px 26px 22px; box-shadow: 0 30px 70px -20px rgba(10, 25, 45, .6);
}
.ma-cc-modal__x { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; color: #8A96A2; cursor: pointer; }
.ma-cc-modal__x:hover { color: #C8161D; }
.ma-cc-modal__title { font-size: 21px; font-weight: 800; color: #0E4C84; margin: 0 0 8px; }
.ma-cc-modal__intro { font-size: 14px; color: #4A555F; line-height: 1.55; margin: 0 0 16px; }
.ma-cc-cats { list-style: none; margin: 0 0 18px; padding: 0; }
.ma-cc-cat { border: 1px solid #E6EBF0; border-radius: 11px; padding: 13px 15px; margin-bottom: 10px; }
.ma-cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ma-cc-cat__name { font-weight: 800; font-size: 14.5px; color: #26303A; }
.ma-cc-cat__always { font-size: 12px; font-weight: 700; color: #2F9E44; text-transform: uppercase; letter-spacing: .04em; }
.ma-cc-cat__desc { margin: 6px 0 0; font-size: 13px; color: #5E6771; line-height: 1.5; }

/* Toggle switch */
.ma-cc-switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.ma-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ma-cc-switch__track { width: 42px; height: 24px; border-radius: 999px; background: #C3CDD7; transition: background .16s; position: relative; }
.ma-cc-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .16s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ma-cc-switch input:checked + .ma-cc-switch__track { background: #C8161D; }
.ma-cc-switch input:checked + .ma-cc-switch__track::after { transform: translateX(18px); }
.ma-cc-switch input:focus-visible + .ma-cc-switch__track { outline: 2px solid #2F80C4; outline-offset: 2px; }

.ma-cc-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ma-cc-modal__actions .ma-cc__btn { flex: 1 1 auto; text-align: center; }
.ma-cc-modal__policy { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: #C8161D; text-decoration: underline; }
body.ma-cc-open { overflow: hidden; }

/* Re-open button */
.ma-cc-reopen {
	position: fixed; left: 16px; bottom: 16px; z-index: 99998; display: inline-flex; align-items: center; gap: 8px;
	background: #0E4C84; color: #fff; border: none; cursor: pointer; padding: 10px 14px; border-radius: 999px;
	font-family: inherit; font-weight: 700; font-size: 13px; box-shadow: 0 8px 22px -6px rgba(14, 76, 132, .6);
}
.ma-cc-reopen:hover { background: #0B3A66; }
.ma-cc-reopen__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; position: relative; }
.ma-cc-reopen__dot::before, .ma-cc-reopen__dot::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.ma-cc-reopen__dot::before { width: 3px; height: 3px; top: 2px; left: 4px; }
.ma-cc-reopen__dot::after { width: 3px; height: 3px; bottom: 2px; right: 2px; }

@media (max-width: 620px) {
	.ma-cc__inner { padding: 16px; }
	.ma-cc__actions { width: 100%; }
	.ma-cc__actions .ma-cc__btn { flex: 1 1 auto; text-align: center; }
	.ma-cc-reopen__label { display: none; }
	.ma-cc-reopen { padding: 11px; }
}
