.local-personalisation-page {
    max-width: 960px;
    margin: 0 auto;
}

.local-personalisation-page__intro {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
}

.local-personalisation-page__widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.local-personalisation-page__widget {
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.local-personalisation-page__resetform {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.local-personalisation-page__resetlabel {
    color: #666;
    font-size: 0.95rem;
}

.personalisation-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.personalisation-widget__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.personalisation-widget__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.personalisation-widget__description {
    margin: 0;
    color: #555;
}

.personalisation-widget__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.personalisation-widget__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.personalisation-widget__label {
    font-weight: 600;
    margin: 0;
}

.personalisation-widget__select {
    max-width: 320px;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd3da;
    border-radius: 0.6rem;
    background: #fff;
}

.personalisation-widget__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.personalisation-widget__button {
    display: inline-block;
    padding: 0.6rem 1rem;
    border: 1px solid #0f6cbf;
    border-radius: 0.65rem;
    background: #0f6cbf;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    min-width: 5.5rem;
    text-align: center;
}


.personalisation-widget__button:hover,
.personalisation-widget__button:focus {
    background: #0c5aa0;
    border-color: #0c5aa0;
}

.personalisation-widget__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.personalisation-widget__meta {
    font-size: 0.92rem;
    color: #666;
}

.personalisation-widget__status {
    font-size: 0.92rem;
    color: #666;
}

.personalisation-widget--colourpalette {
    border-left: 4px solid #0f6cbf;
    padding-left: 0.25rem;
}

.personalisation-widget--fontsize {
    border-left: 4px solid #6f42c1;
    padding-left: 0.25rem;
}

.personalisation-widget.is-dirty {
    border-left: 4px solid #f0ad4e;
}

.personalisation-widget.is-dirty .personalisation-widget__status {
    color: #b26a00;
    font-weight: 600;
}

.personalisation-widget.is-saving {
    border-left: 4px solid #0f6cbf;
}

.personalisation-widget.is-saving .personalisation-widget__status {
    color: #0f6cbf;
    font-weight: 600;
}

.personalisation-widget.is-error {
    border-left: 4px solid #b00020;
}

.personalisation-widget.is-error .personalisation-widget__status {
    color: #b00020;
    font-weight: 600;
}

/* --------------------------------------------------
   Global personalisation effects
-------------------------------------------------- */

html.personalisation-enabled,
body.personalisation-enabled {
    transition: background-color 0.2s ease, color 0.2s ease, font-size 0.2s ease;
}

/* Font size preferences */
html.personalisation-fontsize-default,
body.personalisation-fontsize-default {
    font-size: 16px;
}

html.personalisation-fontsize-small,
body.personalisation-fontsize-small {
    font-size: 14px;
}

html.personalisation-fontsize-medium,
body.personalisation-fontsize-medium {
    font-size: 18px;
}

html.personalisation-fontsize-large,
body.personalisation-fontsize-large {
    font-size: 20px;
}

/* Legacy colourpalette preferences */
html.personalisation-palette-default,
body.personalisation-palette-default {
    background-color: #ffffff;
    color: #212529;
}

html.personalisation-palette-ocean,
body.personalisation-palette-ocean {
    background-color: #eef6fb;
    color: #12344d;
}

html.personalisation-palette-forest,
body.personalisation-palette-forest {
    background-color: #eff7f1;
    color: #1f3b2d;
}

html.personalisation-palette-sunset,
body.personalisation-palette-sunset {
    background-color: #fff5ef;
    color: #5a2d1f;
}

/* --------------------------------------------------
   Colortheme global application
-------------------------------------------------- */

/* Base page colors */
html.personalisation-colortheme-darkcontrast,
body.personalisation-colortheme-darkcontrast {
    background-color: #111111;
    color: #f5f5f5;
}

html.personalisation-colortheme-darkblue,
body.personalisation-colortheme-darkblue {
    background-color: #172435;
    color: #eef5fb;
}

html.personalisation-colortheme-darkwarm,
body.personalisation-colortheme-darkwarm {
    background-color: #2b211f;
    color: #fff3eb;
}

html.personalisation-colortheme-lightclassic,
body.personalisation-colortheme-lightclassic {
    background-color: #ffffff;
    color: #1f2933;
}

html.personalisation-colortheme-lightocean,
body.personalisation-colortheme-lightocean {
    background-color: #eef6fb;
    color: #12344d;
}

html.personalisation-colortheme-lightsand,
body.personalisation-colortheme-lightsand {
    background-color: #fff8ef;
    color: #5a4632;
}

/* Boost page wrappers */
html.personalisation-colortheme-darkcontrast #page-wrapper,
body.personalisation-colortheme-darkcontrast #page-wrapper,
html.personalisation-colortheme-darkcontrast #page,
body.personalisation-colortheme-darkcontrast #page,
html.personalisation-colortheme-darkcontrast #page-content,
body.personalisation-colortheme-darkcontrast #page-content,
html.personalisation-colortheme-darkcontrast .main-inner,
body.personalisation-colortheme-darkcontrast .main-inner,
html.personalisation-colortheme-darkcontrast .region-main,
body.personalisation-colortheme-darkcontrast .region-main,
html.personalisation-colortheme-darkcontrast .drawercontent,
body.personalisation-colortheme-darkcontrast .drawercontent {
    background-color: #1b1b1b;
    color: #f5f5f5;
}

html.personalisation-colortheme-darkblue #page-wrapper,
body.personalisation-colortheme-darkblue #page-wrapper,
html.personalisation-colortheme-darkblue #page,
body.personalisation-colortheme-darkblue #page,
html.personalisation-colortheme-darkblue #page-content,
body.personalisation-colortheme-darkblue #page-content,
html.personalisation-colortheme-darkblue .main-inner,
body.personalisation-colortheme-darkblue .main-inner,
html.personalisation-colortheme-darkblue .region-main,
body.personalisation-colortheme-darkblue .region-main,
html.personalisation-colortheme-darkblue .drawercontent,
body.personalisation-colortheme-darkblue .drawercontent {
    background-color: #213246;
    color: #eef5fb;
}

html.personalisation-colortheme-darkwarm #page-wrapper,
body.personalisation-colortheme-darkwarm #page-wrapper,
html.personalisation-colortheme-darkwarm #page,
body.personalisation-colortheme-darkwarm #page,
html.personalisation-colortheme-darkwarm #page-content,
body.personalisation-colortheme-darkwarm #page-content,
html.personalisation-colortheme-darkwarm .main-inner,
body.personalisation-colortheme-darkwarm .main-inner,
html.personalisation-colortheme-darkwarm .region-main,
body.personalisation-colortheme-darkwarm .region-main,
html.personalisation-colortheme-darkwarm .drawercontent,
body.personalisation-colortheme-darkwarm .drawercontent {
    background-color: #3a2c29;
    color: #fff3eb;
}

html.personalisation-colortheme-lightclassic #page-wrapper,
body.personalisation-colortheme-lightclassic #page-wrapper,
html.personalisation-colortheme-lightclassic #page,
body.personalisation-colortheme-lightclassic #page,
html.personalisation-colortheme-lightclassic #page-content,
body.personalisation-colortheme-lightclassic #page-content,
html.personalisation-colortheme-lightclassic .main-inner,
body.personalisation-colortheme-lightclassic .main-inner,
html.personalisation-colortheme-lightclassic .region-main,
body.personalisation-colortheme-lightclassic .region-main,
html.personalisation-colortheme-lightclassic .drawercontent,
body.personalisation-colortheme-lightclassic .drawercontent {
    background-color: #f5f6f8;
    color: #1f2933;
}

html.personalisation-colortheme-lightocean #page-wrapper,
body.personalisation-colortheme-lightocean #page-wrapper,
html.personalisation-colortheme-lightocean #page,
body.personalisation-colortheme-lightocean #page,
html.personalisation-colortheme-lightocean #page-content,
body.personalisation-colortheme-lightocean #page-content,
html.personalisation-colortheme-lightocean .main-inner,
body.personalisation-colortheme-lightocean .main-inner,
html.personalisation-colortheme-lightocean .region-main,
body.personalisation-colortheme-lightocean .region-main,
html.personalisation-colortheme-lightocean .drawercontent,
body.personalisation-colortheme-lightocean .drawercontent {
    background-color: #dcecf8;
    color: #12344d;
}

html.personalisation-colortheme-lightsand #page-wrapper,
body.personalisation-colortheme-lightsand #page-wrapper,
html.personalisation-colortheme-lightsand #page,
body.personalisation-colortheme-lightsand #page,
html.personalisation-colortheme-lightsand #page-content,
body.personalisation-colortheme-lightsand #page-content,
html.personalisation-colortheme-lightsand .main-inner,
body.personalisation-colortheme-lightsand .main-inner,
html.personalisation-colortheme-lightsand .region-main,
body.personalisation-colortheme-lightsand .region-main,
html.personalisation-colortheme-lightsand .drawercontent,
body.personalisation-colortheme-lightsand .drawercontent {
    background-color: #f5eadb;
    color: #5a4632;
}

/* Cards and common surfaces */
html.personalisation-colortheme-darkcontrast .card,
body.personalisation-colortheme-darkcontrast .card,
html.personalisation-colortheme-darkcontrast .activity-header,
body.personalisation-colortheme-darkcontrast .activity-header,
html.personalisation-colortheme-darkcontrast .secondary-navigation,
body.personalisation-colortheme-darkcontrast .secondary-navigation,
html.personalisation-colortheme-darkcontrast .local-personalisation-page__widget,
body.personalisation-colortheme-darkcontrast .local-personalisation-page__widget {
    background-color: #222222;
    color: #f5f5f5;
    border-color: #3a3a3a;
}

html.personalisation-colortheme-darkblue .card,
body.personalisation-colortheme-darkblue .card,
html.personalisation-colortheme-darkblue .activity-header,
body.personalisation-colortheme-darkblue .activity-header,
html.personalisation-colortheme-darkblue .secondary-navigation,
body.personalisation-colortheme-darkblue .secondary-navigation,
html.personalisation-colortheme-darkblue .local-personalisation-page__widget,
body.personalisation-colortheme-darkblue .local-personalisation-page__widget {
    background-color: #2a4057;
    color: #eef5fb;
    border-color: #3c5874;
}

html.personalisation-colortheme-darkwarm .card,
body.personalisation-colortheme-darkwarm .card,
html.personalisation-colortheme-darkwarm .activity-header,
body.personalisation-colortheme-darkwarm .activity-header,
html.personalisation-colortheme-darkwarm .secondary-navigation,
body.personalisation-colortheme-darkwarm .secondary-navigation,
html.personalisation-colortheme-darkwarm .local-personalisation-page__widget,
body.personalisation-colortheme-darkwarm .local-personalisation-page__widget {
    background-color: #4a3934;
    color: #fff3eb;
    border-color: #67514a;
}

html.personalisation-colortheme-lightclassic .card,
body.personalisation-colortheme-lightclassic .card,
html.personalisation-colortheme-lightclassic .activity-header,
body.personalisation-colortheme-lightclassic .activity-header,
html.personalisation-colortheme-lightclassic .secondary-navigation,
body.personalisation-colortheme-lightclassic .secondary-navigation,
html.personalisation-colortheme-lightclassic .local-personalisation-page__widget,
body.personalisation-colortheme-lightclassic .local-personalisation-page__widget {
    background-color: #ffffff;
    color: #1f2933;
    border-color: #d9dee3;
}

html.personalisation-colortheme-lightocean .card,
body.personalisation-colortheme-lightocean .card,
html.personalisation-colortheme-lightocean .activity-header,
body.personalisation-colortheme-lightocean .activity-header,
html.personalisation-colortheme-lightocean .secondary-navigation,
body.personalisation-colortheme-lightocean .secondary-navigation,
html.personalisation-colortheme-lightocean .local-personalisation-page__widget,
body.personalisation-colortheme-lightocean .local-personalisation-page__widget {
    background-color: #f7fbfe;
    color: #12344d;
    border-color: #bfdced;
}

html.personalisation-colortheme-lightsand .card,
body.personalisation-colortheme-lightsand .card,
html.personalisation-colortheme-lightsand .activity-header,
body.personalisation-colortheme-lightsand .activity-header,
html.personalisation-colortheme-lightsand .secondary-navigation,
body.personalisation-colortheme-lightsand .secondary-navigation,
html.personalisation-colortheme-lightsand .local-personalisation-page__widget,
body.personalisation-colortheme-lightsand .local-personalisation-page__widget {
    background-color: #fffaf5;
    color: #5a4632;
    border-color: #e5d5c2;
}

/* Text links for dark themes */
html.personalisation-colortheme-darkcontrast a,
body.personalisation-colortheme-darkcontrast a {
    color: #ffd54a;
}

html.personalisation-colortheme-darkblue a,
body.personalisation-colortheme-darkblue a {
    color: #8cc8ff;
}

html.personalisation-colortheme-darkwarm a,
body.personalisation-colortheme-darkwarm a {
    color: #ffb58a;
}