body.ssml-preferences-active #ss-source-header button.ss-locale { display: none !important; }
#ss-source-header .ssml-region-button {
    display: inline-flex; align-items: center; gap: 6px; max-width: 235px;
    margin: 0; padding: 4px 0; border: 0; background: transparent; color: inherit;
    font: inherit; font-size: 12px; line-height: 1.4; cursor: pointer;
}
#ss-source-header .ssml-region-button .ssml-country-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ss-source-header .ssml-region-button .ssml-flag { flex: 0 0 auto; font-size: 17px; line-height: 1; }
#ss-source-header .ssml-region-button .ssml-region-arrow { flex: 0 0 auto; font-size: 14px; }
#ss-source-header .ssml-region-button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.ssml-preferences-dialog {
    width: min(620px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 40px);
    margin: auto; padding: 0; border: 0; border-radius: 12px; background: #fff; color: #182333;
    font-family: inherit; box-shadow: 0 20px 80px #0005;
}
.ssml-preferences-dialog::backdrop { background: #0007; }
.ssml-preferences-dialog:not([open]) { display: none; }
.ssml-dialog-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.ssml-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid #e7e9ec; }
.ssml-dialog-header h2 { margin: 0; font: inherit; font-size: 23px; line-height: 1.25; font-weight: 700; }
.ssml-dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: #182333; font-size: 26px; cursor: pointer; }
.ssml-dialog-form { display: flex; flex-direction: column; overflow: hidden; margin: 0 !important; }
.ssml-dialog-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 19px 18px; overflow: auto; padding: 22px 24px; }
.ssml-pref-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.ssml-pref-country { grid-column: 1 / -1; }
.ssml-pref-field label { color: #182333; font-size: 14px; line-height: 1.4; font-weight: 600; }
.ssml-preferences-dialog .ssml-pref-field select,
.ssml-preferences-dialog .ssml-pref-field input[type=search] {
    box-sizing: border-box; width: 100%; min-width: 0; height: 44px; margin: 0; padding: 8px 11px;
    border: 1px solid #cbd0d7; border-radius: 5px; background: #fff; color: #182333; font: inherit; font-size: 14px;
}
.ssml-preferences-dialog select { appearance: auto; }
.ssml-preferences-dialog select:focus, .ssml-preferences-dialog input:focus { outline: 2px solid #1d65b1; outline-offset: 1px; }
.ssml-country-results { min-height: 0; margin: 0; color: #566273; font-size: 13px; }
.ssml-country-results:empty { display: none; }
.ssml-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 17px 24px 21px; border-top: 1px solid #e7e9ec; background: #fff; }
.ssml-dialog-save { min-height: 44px; padding: 11px 24px; border: 1px solid #142538; border-radius: 4px; background: #142538; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ssml-dialog-save:focus-visible, .ssml-dialog-close:focus-visible { outline: 2px solid #1d65b1; outline-offset: 3px; }
.ssml-money { unicode-bidi: isolate; }
.ssml-reference { display: block; font-size: .82em; line-height: 1.45; opacity: .8; }
.ssml-reference[hidden] { display: none !important; }
.ssml-region-announcement { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(max-width: 760px) {
    #ss-source-header .ssml-region-button { max-width: 185px; font-size: 11px; }
    .ssml-preferences-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
    .ssml-dialog-panel { max-height: calc(100dvh - 24px); }
    .ssml-dialog-header { padding: 16px 18px 12px; }
    .ssml-dialog-header h2 { font-size: 21px; }
    .ssml-dialog-fields { padding: 18px; gap: 16px 12px; }
    .ssml-dialog-actions { padding: 14px 18px 18px; }
}
@media(max-width: 420px) { .ssml-dialog-fields { grid-template-columns: minmax(0,1fr); } .ssml-dialog-save { width: 100%; } }
