.cookies-banner[hidden],
.cookies-modal[hidden],
.cookies-manage-button[hidden] { display: none !important; }

.cookies-modal-open { overflow: hidden; }

.cookies-banner {
    position: fixed; z-index: 1090; right: 20px; bottom: 20px; left: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 28px;
    width: min(1120px, calc(100% - 40px)); margin: auto; padding: 20px 22px;
    border: 1px solid rgba(109, 93, 252, .2); border-radius: 20px;
    background: rgba(255, 255, 255, .98); color: #111936;
    box-shadow: 0 22px 70px rgba(20, 18, 55, .2);
    font-family: "DM Sans", sans-serif; backdrop-filter: blur(14px);
}

.cookies-banner-copy { min-width: 0; }
.cookies-banner-copy strong { display: block; margin-bottom: 5px; font-size: 1rem; font-weight: 800; }
.cookies-banner-copy p { max-width: 680px; margin: 0; color: #596176; font-size: .86rem; line-height: 1.55; }
.cookies-banner-copy a, .cookies-modal a { color: #6252f2; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.cookies-banner-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 9px; margin: 0; }

.cookies-button {
    display: inline-flex; min-height: 42px; align-items: center; justify-content: center;
    padding: 10px 16px; border: 1px solid transparent; border-radius: 12px;
    font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.cookies-button:hover { transform: translateY(-1px); }
.cookies-button:disabled { opacity: .65; cursor: wait; transform: none; }
.cookies-button-primary { border-color: #6d5dfc; background: #6d5dfc; color: #fff; box-shadow: 0 8px 20px rgba(109, 93, 252, .25); }
.cookies-button-secondary { border-color: #e2e4ee; background: #f4f5f9; color: #222a42; }
.cookies-button-outline { border-color: #cfd3e2; background: #fff; color: #252d46; }

.cookies-manage-button {
    position: fixed; z-index: 1050; bottom: 14px; left: 14px; min-height: 36px;
    padding: 7px 12px; border: 1px solid #dcddea; border-radius: 999px;
    background: rgba(255, 255, 255, .96); color: #4f46d9;
    box-shadow: 0 8px 24px rgba(25, 24, 62, .14);
    font: 750 .72rem "DM Sans", sans-serif; cursor: pointer; text-decoration: none;
}

.cookies-modal {
    position: fixed; z-index: 1100; inset: 0; display: none; place-items: center;
    padding: 18px; font-family: "DM Sans", sans-serif;
}
.cookies-modal:target,
.cookies-modal.cookies-open { display: grid; }
.cookies-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(13, 17, 38, .66); cursor: default; }
.cookies-modal-panel {
    position: relative; width: min(660px, 100%); max-height: min(820px, calc(100vh - 36px));
    overflow: auto; border: 1px solid rgba(255, 255, 255, .3); border-radius: 24px;
    background: #fff; color: #111936; box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}
.cookies-modal-header {
    position: sticky; z-index: 1; top: 0; display: flex; align-items: flex-start;
    justify-content: space-between; gap: 20px; padding: 24px 26px 20px;
    border-bottom: 1px solid #ececf3; background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
}
.cookies-modal-header span { display: block; margin-bottom: 5px; color: #6d5dfc; font-size: .69rem; font-weight: 850; letter-spacing: .12em; }
.cookies-modal-header h2 { margin: 0; font-size: 1.55rem; font-weight: 850; }
.cookies-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #e0e2eb; border-radius: 12px; background: #f8f8fb; color: #343b51; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.cookies-modal form { padding: 8px 26px 26px; }
.cookies-category { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 0; border-bottom: 1px solid #ececf3; cursor: pointer; }
.cookies-category > div { min-width: 0; }
.cookies-category strong { display: block; margin-bottom: 4px; font-size: .95rem; font-weight: 820; }
.cookies-category p { margin: 0; color: #667085; font-size: .8rem; line-height: 1.5; }
.cookies-required { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #edeaff; color: #5947e8; font-size: .67rem; font-weight: 850; }
.cookies-switch { position: relative; display: inline-flex; flex: 0 0 48px; width: 48px; height: 28px; }
.cookies-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cookies-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cdd1dc; transition: .2s ease; }
.cookies-switch span::after { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .2); content: ""; transition: .2s ease; }
.cookies-switch input:checked + span { background: #6d5dfc; }
.cookies-switch input:checked + span::after { transform: translateX(20px); }
.cookies-switch input:focus-visible + span { outline: 3px solid rgba(109, 93, 252, .28); outline-offset: 3px; }
.cookies-modal-note { margin: 18px 0 0; padding: 13px 15px; border-radius: 12px; background: #f7f6ff; color: #5d6477; font-size: .76rem; line-height: 1.55; }
.cookies-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; }
.cookies-modal-footer a { font-size: .78rem; }

@media (max-width: 760px) {
    .cookies-banner { right: 12px; bottom: 12px; left: 12px; align-items: stretch; flex-direction: column; width: calc(100% - 24px); gap: 16px; padding: 18px; }
    .cookies-banner-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cookies-banner-actions .cookies-button-primary { grid-column: 1 / -1; grid-row: 1; }
    .cookies-modal { padding: 10px; }
    .cookies-modal-panel { max-height: calc(100vh - 20px); border-radius: 19px; }
    .cookies-modal-header, .cookies-modal form { padding-right: 18px; padding-left: 18px; }
    .cookies-modal-footer { align-items: stretch; flex-direction: column-reverse; }
    .cookies-modal-footer .cookies-button { width: 100%; }
}
