.cookie-banner-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    background: rgba(13, 17, 22, .48);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    overflow-y: auto;
}

.cookie-banner-box {
    position: relative;
    box-sizing: border-box;
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 18px;
    background: #fff;
    color: #252a30;
    box-shadow: 0 18px 60px rgba(0,0,0,.24);
    font-family: inherit;
}

.cookie-banner-box h2 { margin: 0 42px 12px 0; font-size: 1.35rem; line-height: 1.3; font-weight: 700; }
.cookie-banner-box h3 { margin: 22px 0 6px; font-size: 1.08rem; }
.cookie-banner-box p { margin: 0; color: #626b75; font-size: .94rem; line-height: 1.6; }
.cookie-intro { margin-bottom: 22px; }
.cookie-details-link { display: inline !important; margin-left: 4px; color: #168b83; font-size: inherit; font-weight: 700; white-space: nowrap; text-decoration: none; }
.cookie-details-link, .cookie-details-link * { box-sizing: border-box; }
.cookie-details-link a.cookie-details-anchor { display: inline !important; color: #168b83 !important; font-family: inherit !important; font-size: inherit !important; font-weight: 700 !important; line-height: inherit !important; text-decoration: none !important; white-space: nowrap !important; margin: 0 !important; padding: 0 !important; vertical-align: baseline !important; }
.cookie-details-link a.cookie-details-anchor:hover { color: #106f69 !important; text-decoration: underline !important; }
.cookie-details-arrow { display: inline !important; margin-left: 4px; color: #168b83 !important; font: inherit !important; font-weight: 700 !important; white-space: nowrap !important; }
.cookie-close-button { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f2f3; color: #3a4148; font-size: 25px; line-height: 1; cursor: pointer; }
.cookie-close-button:hover { background: #e4e8e9; }
.cookie-settings-intro { margin-bottom: 14px !important; }
.cookie-category { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0; padding: 18px; border: 1px solid #e4e9f0; border-radius: 13px; background: linear-gradient(135deg, #fff 0%, #fafbfd 100%); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.cookie-category:hover { border-color: #cbd8e8; box-shadow: 0 4px 16px rgba(29, 57, 92, .05); }
.cookie-category-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 50%; }
.cookie-category-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cookie-icon-required { color: #243b5b; background: #e9edf3; }
.cookie-icon-analytics { color: #147f8b; background: #def2f2; }
.cookie-icon-marketing { color: #687dba; background: #e8eaff; }
.cookie-category-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.cookie-category-copy p { font-size: .9rem; line-height: 1.5; }
.cookie-category-copy strong, .cookie-category-copy h4 { margin: 0; color: #292f35; font-size: .98rem; font-weight: 700; }
.cookie-category-copy span { color: #626b75; font-size: .9rem; line-height: 1.5; }
.cookie-toggle-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cookie-toggle { position: relative; display: inline-flex; flex: 0 0 52px; align-items: center; width: 52px; height: 30px; padding: 4px; border-radius: 999px; background: #c6ced9; transition: background .2s ease, box-shadow .2s ease; }
.cookie-toggle > span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); transform: translateX(0); transition: transform .2s ease; }
.cookie-toggle-input:checked + .cookie-toggle { background: #168b83; }
.cookie-toggle-input:checked + .cookie-toggle > span { transform: translateX(22px); }
.cookie-toggle-input:focus-visible + .cookie-toggle { outline: 3px solid rgba(23,104,232,.28); outline-offset: 3px; }
.cookie-toggle-locked { flex-basis: 52px; background: #d7dde6; opacity: .9; cursor: not-allowed; }
.cookie-toggle-locked > span { transform: translateX(22px); background: #f8fafc; }
.cookie-category-required { cursor: default; }
.cookie-category-required { cursor: default; }
.cookie-always-active { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #eef2f7; color: #596a83; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.cookie-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.cookie-btn { flex: 1 1 150px; min-height: 46px; padding: 12px 16px; border: 1px solid #d7dcdf; border-radius: 9px; background: #fff; color: #30373d; font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.cookie-btn:hover { border-color: #aab5b8; background: #f5f7f7; }
.cookie-btn:focus-visible, .cookie-close-button:focus-visible, .cookie-details-link:focus-visible { outline: 3px solid rgba(63,98,89,.35); outline-offset: 3px; }
.cookie-btn-primary { border-color: #168b83; background: #168b83; color: #fff; }
.cookie-btn-primary:hover { border-color: #106f69; background: #106f69; }
.cookie-buttons-detailed #btn-cookie-save { border-color: #d5e9e7; background: #dcefeb; color: #087a73; }
.cookie-buttons-detailed #btn-cookie-save:hover { border-color: #b7dcd7; background: #cce8e3; }
.cookie-buttons-detailed #btn-cookie-necessary-detailed { border-color: #d5e0e8; background: #fff; color: #25364b; }
.cookie-buttons-detailed #btn-cookie-accept-all-detailed { border-color: #168b83; background: #168b83; color: #fff; }
.cookie-buttons-detailed #btn-cookie-accept-all-detailed:hover { border-color: #106f69; background: #106f69; }
.cookie-buttons-detailed #btn-cookie-necessary-detailed { border-color: #d5e0e8; background: #fff; color: #25364b; }
.cookie-buttons-detailed #btn-cookie-accept-all-detailed { border-color: #168b83; background: #168b83; color: #fff; }
.cookie-buttons-detailed #btn-cookie-accept-all-detailed:hover { border-color: #106f69; background: #106f69; }
/* Állandó, diszkrét süti-beállítás gomb */
.cookie-change-box { position: fixed; z-index: 100000; bottom: 16px; left: 16px; padding: 0; background: transparent; color: inherit; font-size: 13px; }
.cookie-reopen-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 15px; border: 1px solid rgba(22,139,131,.35); border-radius: 999px; background: rgba(255,255,255,.96); color: #147f78; box-shadow: 0 4px 18px rgba(17,39,43,.16); font: inherit; font-size: 13px; font-weight: 650; line-height: 1.2; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.cookie-reopen-button:hover { background: #168b83; border-color: #168b83; color: #fff; box-shadow: 0 6px 20px rgba(22,139,131,.25); transform: translateY(-1px); }
.cookie-reopen-button:focus-visible { outline: 3px solid rgba(22,139,131,.3); outline-offset: 3px; }
.cookie-reopen-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cookie-close-button:not([hidden]) { display: grid !important; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
    .cookie-banner-overlay { align-items: flex-end; padding: 10px; }
    .cookie-banner-box { max-height: calc(100vh - 20px); padding: 23px 18px 18px; border-radius: 15px; }
    .cookie-banner-box h2 { font-size: 1.18rem; }
    .cookie-buttons { flex-direction: column; gap: 8px; margin-top: 18px; }
    .cookie-btn { flex: 1 1 auto; width: 100%; min-height: 44px; }
    .cookie-category { gap: 12px; padding: 14px; }
    .cookie-category-icon { flex-basis: 42px; width: 42px; height: 42px; }
    .cookie-category-icon svg { width: 21px; height: 21px; }
    .cookie-always-active { display: none; }
    .cookie-change-box { bottom: 10px; left: 10px; }
    .cookie-reopen-button { min-height: 42px; padding: 10px 13px; }
}

/* A bezáró gomb kizárólag a részletes beállításokban jelenik meg. */
.cookie-close-button[hidden] { display: none !important; }
.cookie-banner-expanded .cookie-close-button:not([hidden]) { display: grid !important; }


/* A Quest szerkesztőből érkező link helyett a sablon állítja elő az inline hivatkozást. */
#cookie-banner .cookie-intro p .cookie-details-link { display: inline !important; white-space: nowrap !important; }
#cookie-banner .cookie-intro p .cookie-details-link a.cookie-details-anchor { display: inline !important; color: #168b83 !important; text-decoration: none !important; }
#cookie-banner .cookie-intro p .cookie-details-link .cookie-details-arrow { display: inline !important; color: #168b83 !important; }
#cookie-banner .cookie-intro p .cookie-details-link a.cookie-details-anchor:hover { color: #106f69 !important; text-decoration: underline !important; }


/* A sütipanel megnyitásakor az állandó Beállítások gomb ne takarja a panelt mobilon vagy asztali nézetben. */
#cookie-banner[aria-hidden="false"] + .cookie-change-box {
    display: none !important;
}
