#newon-cookie-panel,
#newon-cookie-panel *,
.newon-cookie-settings {
    box-sizing: border-box;
}

#newon-cookie-panel[hidden],
#newon-cookie-panel [hidden] {
    display: none !important;
}

#newon-cookie-panel {
    position: fixed;
    z-index: 10000;
    inset: auto 0 0;
    max-height: 78vh;
    max-height: 78dvh;
    overflow: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 2px solid #c5a059;
    background: #0c2239;
    color: #f7fafc;
    box-shadow: 0 -7px 30px #06182e42;
    font: 14px/1.5 system-ui, -apple-system, sans-serif;
}

.newon-cookie-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 12px;
    align-items: center;
    max-width: 1460px;
    padding: 17px clamp(20px, 3vw, 48px);
    margin-inline: auto;
}

#newon-cookie-heading {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 5px;
    color: #fff;
    font: 700 19px/1.2 system-ui, -apple-system, sans-serif;
    letter-spacing: -.015em;
}

#newon-cookie-panel p { margin: 0; color: #dce8f1; font: inherit; }
.newon-cookie-content > p:first-of-type { grid-column: 1; grid-row: 2; padding-right: 12px; }
.newon-cookie-actions { display: flex; gap: 8px; grid-column: 3; grid-row: 1 / 3; }

#newon-cookie-panel button,
button.newon-cookie-settings {
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid #abbfd1;
    border-radius: 5px;
    background: #f6f9fc;
    color: #092d4f;
    font: 650 14px/1.3 system-ui, -apple-system, sans-serif;
    cursor: pointer;
}

#newon-cookie-panel button:hover,
button.newon-cookie-settings:hover { background: #e6eff7; }

#newon-cookie-panel :focus-visible,
button.newon-cookie-settings:focus-visible {
    outline: 2px solid #e7c886;
    outline-offset: 3px;
}

#newon-cookie-panel .newon-cookie-actions button { flex: 1; white-space: nowrap; }
#newon-cookie-panel button:disabled { cursor: wait; opacity: .65; }

#newon-cookie-panel #newon-cookie-customise {
    grid-column: 2;
    grid-row: 1 / 3;
    background: transparent;
    border-color: #9cb0c3;
    color: #fff;
}

#newon-cookie-panel #newon-cookie-customise:hover { background: #1a3956; }

#newon-cookie-options {
    grid-column: 1 / -1;
    border-top: 1px solid #68839b;
    margin-top: 14px;
    padding-top: 3px;
}

.newon-cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #58738c;
}

#newon-cookie-panel .newon-cookie-option label,
#newon-cookie-panel .newon-cookie-option strong { color: #fff; font-weight: 700; }

#newon-cookie-panel .newon-cookie-option p { font-size: 13px; margin-top: 3px; }
.newon-cookie-option span { white-space: nowrap; font-size: 12px; color: #e7c886; }

#newon-cookie-measurement {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 3px 2px 0 0;
    accent-color: #c5a059;
}

.newon-cookie-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
}

#newon-cookie-panel a { color: #e7c886; text-decoration: underline; }
#newon-cookie-panel #newon-cookie-status { grid-column: 1 / -1; margin-top: 8px; }
button.newon-cookie-settings { margin: .65rem 1rem; }
.newon-cookie-settings-floating { position: fixed; right: .5rem; bottom: .5rem; z-index: 9999; }

@media (max-width: 940px) {
    .newon-cookie-content {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 8px;
        padding: 13px 20px;
    }

    #newon-cookie-heading { grid-column: 1 / -1; margin: 0; }
    .newon-cookie-content > p:first-of-type { grid-column: 1 / -1; padding-right: 0; }
    #newon-cookie-panel #newon-cookie-customise { grid-column: 1; grid-row: 3; justify-self: start; }
    .newon-cookie-actions { grid-column: 2; grid-row: 3; }
    #newon-cookie-options { margin-top: 3px; }
}

@media (max-width: 480px) {
    .newon-cookie-content { display: flex; flex-direction: column; align-items: stretch; padding: 12px 14px 10px; gap: 8px; }
    #newon-cookie-heading { font-size: 17px; }
    #newon-cookie-panel { font-size: 13px; }
    #newon-cookie-panel #newon-cookie-customise { align-self: flex-start; }
    #newon-cookie-panel button { padding-inline: 7px; font-size: 13px; }
    .newon-cookie-actions button { min-width: 0; }
    #newon-cookie-panel .newon-cookie-actions button { white-space: normal; }
}
