:root {
    --mpp-tools-blue: #2563eb;
    --mpp-tools-cyan: #06b6d4;
    --mpp-tools-ink: #0f172a;
    --mpp-tools-border: #cbd5e1;
}

.mpp-site-tool-button {
    position: fixed;
    bottom: 18px;
    z-index: 2147483000;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
    color: #fff;
    font: 700 14px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.mpp-site-tool-button:hover,
.mpp-site-tool-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .28);
}

.mpp-site-tool-button:focus-visible,
.mpp-cookie-action:focus-visible,
.mpp-a11y-control:focus-visible,
.mpp-tool-close:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

#mpp-accessibility-button {
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px 0 10px;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.mpp-a11y-button-mark {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 6px;
    background: #fff;
    color: #1d4ed8;
    font-size: 15px;
    font-weight: 900;
}

#mpp-cookie-settings-button {
    right: 18px;
    padding: 0 16px;
    background: #0f172a;
}

body.mpp-cookie-banner-open .mpp-site-tool-button {
    bottom: 174px;
}

.mpp-cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483001;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, .55);
    border-radius: 8px;
    background: rgba(15, 23, 42, .98);
    box-shadow: 0 24px 60px rgba(2, 6, 23, .38);
    color: #e2e8f0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mpp-cookie-banner[hidden],
.mpp-tool-panel[hidden],
.mpp-tool-backdrop[hidden] {
    display: none !important;
}

.mpp-cookie-banner-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.mpp-cookie-title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
}

.mpp-cookie-copy {
    margin: 0;
    max-width: 760px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

.mpp-cookie-copy a {
    color: #7dd3fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mpp-cookie-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.mpp-cookie-action {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid #64748b;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0;
    cursor: pointer;
}

.mpp-cookie-action:hover { background: rgba(255, 255, 255, .09); }
.mpp-cookie-action-primary { border-color: #38bdf8; background: #0284c7; }
.mpp-cookie-action-primary:hover { background: #0369a1; }

.mpp-tool-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483002;
    background: rgba(2, 6, 23, .58);
}

.mpp-tool-panel {
    position: fixed;
    z-index: 2147483003;
    width: min(430px, calc(100vw - 28px));
    max-height: min(680px, calc(100vh - 28px));
    overflow-y: auto;
    border: 1px solid var(--mpp-tools-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(2, 6, 23, .35);
    color: var(--mpp-tools-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mpp-cookie-panel { inset: auto 14px 14px auto; }
.mpp-a11y-panel { inset: auto auto 14px 14px; }

.mpp-tool-panel-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.mpp-tool-panel-title {
    margin: 0;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: 0;
}

.mpp-tool-panel-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.mpp-tool-close {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.mpp-tool-panel-body { padding: 18px 20px 20px; }

.mpp-consent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mpp-consent-row:last-of-type { border-bottom: 0; }
.mpp-consent-row strong { display: block; font-size: 15px; }
.mpp-consent-row p { margin: 4px 0 0; color: #64748b; font-size: 13px; line-height: 1.45; }
.mpp-consent-required { color: #047857; font-size: 12px; font-weight: 800; }

.mpp-switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 26px;
}

.mpp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mpp-switch-track { width: 46px; height: 26px; border-radius: 999px; background: #94a3b8; transition: background .18s; cursor: pointer; }
.mpp-switch-track::after { content: ""; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .28); transition: transform .18s; }
.mpp-switch input:checked + .mpp-switch-track { background: #2563eb; }
.mpp-switch input:checked + .mpp-switch-track::after { transform: translateX(20px); }
.mpp-switch input:focus-visible + .mpp-switch-track { outline: 3px solid #fbbf24; outline-offset: 3px; }

.mpp-panel-actions { display: flex; gap: 9px; margin-top: 18px; }
.mpp-panel-actions .mpp-cookie-action { flex: 1; color: #0f172a; border-color: #94a3b8; }
.mpp-panel-actions .mpp-cookie-action-primary { color: #fff; border-color: #2563eb; background: #2563eb; }

.mpp-a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mpp-a11y-control {
    min-height: 84px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.mpp-a11y-control:hover { border-color: #60a5fa; background: #eff6ff; }
.mpp-a11y-control[aria-pressed="true"] { border-color: #2563eb; background: #dbeafe; box-shadow: inset 0 0 0 1px #2563eb; }
.mpp-a11y-control strong { display: block; margin-bottom: 5px; font-size: 14px; }
.mpp-a11y-control span { color: #64748b; font-size: 12px; line-height: 1.35; }
.mpp-a11y-reset { width: 100%; margin-top: 12px; color: #334155; }

html.mpp-text-large { font-size: 112.5%; }
html.mpp-text-largest { font-size: 125%; }
html.mpp-readable-font body,
html.mpp-readable-font body * { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0 !important; }
html.mpp-underline-links a { text-decoration: underline !important; text-underline-offset: 3px !important; }
html.mpp-grayscale { filter: grayscale(1); }
html.mpp-high-contrast { filter: contrast(1.35); }
html.mpp-grayscale.mpp-high-contrast { filter: grayscale(1) contrast(1.35); }
html.mpp-high-contrast body { background: #fff !important; color: #000 !important; }
html.mpp-high-contrast a { text-decoration: underline !important; }
html.mpp-reduce-motion *,
html.mpp-reduce-motion *::before,
html.mpp-reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

@media (prefers-reduced-motion: reduce) {
    .mpp-site-tool-button { transition: none; }
}

@media (max-width: 720px) {
    .mpp-cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
    .mpp-cookie-banner-inner { grid-template-columns: 1fr; gap: 14px; }
    .mpp-cookie-actions { justify-content: stretch; }
    .mpp-cookie-action { flex: 1 1 calc(50% - 9px); }
    .mpp-cookie-action-primary { flex-basis: 100%; order: -1; }
    body.mpp-cookie-banner-open .mpp-site-tool-button { bottom: 278px; }
    #mpp-accessibility-button { left: 10px; padding-right: 10px; }
    #mpp-accessibility-button .mpp-tool-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    #mpp-cookie-settings-button { right: 10px; padding: 0 12px; }
    .mpp-cookie-panel, .mpp-a11y-panel { inset: auto 8px 8px 8px; width: auto; max-height: calc(100vh - 16px); }
}

@media (max-width: 390px) {
    .mpp-a11y-grid { grid-template-columns: 1fr; }
    .mpp-cookie-action { flex-basis: 100%; }
    body.mpp-cookie-banner-open .mpp-site-tool-button { bottom: 356px; }
}
