/* atkinson-hyperlegible-next-latin-ext-400-normal */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format('woff2'), url(fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* atkinson-hyperlegible-next-latin-400-normal */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format('woff2'), url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* atkinson-hyperlegible-next-latin-ext-700-normal */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2) format('woff2'), url(fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* atkinson-hyperlegible-next-latin-700-normal */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format('woff2'), url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'opendyslexic';
    src: url(fonts/OpenDyslexic-Regular.woff2) format('woff2'),
        url(fonts/OpenDyslexic-Regular.woff) format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --tolkie-primary-color: #222f4b;
    --tolkie-primary-color-70: rgba(16, 18, 55, 0.70);
    --tolkie-primary-color-50: rgba(16, 18, 55, 0.50);
    --tolkie-primary-color-light: rgba(16, 18, 55, 0.30);
    --tolkie-text-color-lightest: #595959;
    
    --blue-link-color: #123686;

    --dark-red-color: #a6271a;
    --lightest-red-color: #ffcdc8;

    --dark-green-color: #153d2c;
    --lightest-green-color: #ddf5ea;

    --dark-orange-color: #492514;
    --lightest-orange-color: #f4e1cb;

    --tolkie-font-size-8: 8px;
    --tolkie-font-size-10: 10px;
    --tolkie-font-size-11: 11px;
    --tolkie-font-size-12: 12px;
    --tolkie-font-size-13: 13px;
    --tolkie-font-size-14: 14px;
    --tolkie-font-size-15: 15px;
    --tolkie-font-size-16: 16px;
    --tolkie-font-size-17: 17px;
    --tolkie-font-size-18: 18px;
    --tolkie-font-size-19: 19px;
    --tolkie-font-size-20: 20px;
    --tolkie-font-size-23: 23px;
    --tolkie-font-size-25: 25px;
    --tolkie-font-size-28: 25px;

    --default-border-radius: 8px;
}

:focus-visible {
    box-shadow: 0 0 0 .25rem white;
    outline: .375rem double black;
    border-radius: .125rem;
}

body {
    color: #000;
}

* {
    color: inherit;
    font-family: "Atkinson Hyperlegible Next", sans-serif;
}

.z-1 {
    z-index: 1;
}

.z-2 {
    z-index: 2;
}

.d-flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.justify-content-end {
    justify-content: flex-end;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[class*="tolkie"],
[id*="tolkie"] {
    box-sizing: border-box;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

[class*="tolkie-iframe-font-size"] {
    font-style: normal;
    line-height: 1.5;
}

[role="button"] {
    cursor: pointer;
}

p,
label,
li {
    line-height: 1.5;
}

iframe {
    width: 320px;
    height: 200px;
}

svg.tolkie-no-tooltip>use {
    pointer-events: none;
}

.tolkie-iframe-btn-disabled {
    opacity: 0.4;
}

.tolkie-translate-page-language-btn[disabled],
.tolkie-translate-page-language-btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.tolkie-iframe-display-none {
    display: none !important;
}

.tolkie-iframe-text-center {
    text-align: center;
}

.tolkie-iframe-text-right {
    text-align: right;
}

.tolkie-iframe-margin-0 {
    margin: 0 !important;
}

.tolkie-iframe-margin-top-0 {
    margin-top: 0 !important;
}

.tolkie-iframe-margin-top-bottom-0 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.tolkie-iframe-margin-bottom-0 {
    margin-bottom: 0 !important;
}

.tolkie-iframe-text-color-lightest {
    color: var(--tolkie-text-color-lightest);
}

.tolkie-iframe-font-size-8 {
    font-size: var(--tolkie-font-size-8);
}

.tolkie-iframe-font-size-10 {
    font-size: var(--tolkie-font-size-10);
}

.tolkie-iframe-font-size-12 {
    font-size: var(--tolkie-font-size-12);
}

.tolkie-iframe-font-size-13 {
    font-size: var(--tolkie-font-size-13);
}

.tolkie-iframe-font-size-14 {
    font-size: var(--tolkie-font-size-14);
}

.tolkie-iframe-font-size-15 {
    font-size: var(--tolkie-font-size-15);
}

.tolkie-iframe-font-size-16 {
    font-size: var(--tolkie-font-size-16);
}

.tolkie-iframe-font-size-20 {
    font-size: var(--tolkie-font-size-20);
}

.tolkie-iframe-font-size-23 {
    font-size: var(--tolkie-font-size-23);
}

.tolkie-iframe-font-size-25 {
    font-size: var(--tolkie-font-size-25);
}

.tolkie-iframe-font-weight-600 {
    font-weight: 600;
}

.tolkie-iframe-font-weight-500 {
    font-weight: 500;
}

.tolkie-iframe-font-weight-400 {
    font-weight: 400;
}

.tolkie-iframe-font-weight-300 {
    font-weight: 300;
}

.tolkie-iframe-font-italic {
    font-style: italic;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.gap-12 {
    gap: 12px;
}

.tolkie-iframe-page-link,
a[href] {
    color: var(--blue-link-color);
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
}

/* Disclaimer */
#tolkie-iframe-disclaimer-text-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#tolkie-svg-container-disclaimer-icon svg {
    height: 20px;
    width: 20px;
}

#tolkie-svg-container-disclaimer-icon svg path {
    stroke: var(--blue-link-color);
}

#tolkie-iframe-body {
    margin: 0;
    font-family: "Atkinson Hyperlegible Next", sans-serif;
}

#tolkie-iframe-container {
    max-height: calc(100% - 30px);
    height: fit-content;
    width: 100%;
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: center;
}

#tolkie-iframe-container[tolkie-big-screen="true"] {
    bottom: 15px;
}

#tolkie-iframe-container[tolkie-big-screen="true"] #tolkie-iframe-container-scrollable {
    border-bottom: 2px solid #E4E4E4 !important;
    border-radius: 0 0 10px 10px;
}

#tolkie-iframe-inner-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#tolkie-iframe-container div:not(.tolkie-iframe-video-container, .tolkie-iframe-video-container div) {
    max-width: 1000px;
    height: auto;
}

#tolkie-iframe-container.tolkie-iframe-small-height {
    max-height: none;
}

.tolkie-iframe-full-screen#tolkie-iframe-container {
    height: 100vh;
}

.tolkie-svg-container {
    display: flex;
}

.tolkie-svg-container svg {
    color: var(--tolkie-primary-color);
}

#tolkie-iframe-inner-container>div:not(#navigation-panel-container):not(#navigation-panel-container-back) {
    border: 2px solid #E4E4E4;
    border-bottom: none;
    border-top: none;
    background: #FFF;
    padding-right: 10px;
    padding-left: 10px;
}

/* Navigation Panel */
#tolkie-iframe-navigation-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 10px 10px 0px 0px;
    border-bottom: 2px solid #E4E4E4;
    background: #E7E7E7;
}

#tolkie-iframe-control-btn-close {
    display: flex;
    align-items: center;
    position: relative;
    width: fit-content;
    color: var(--dark-red-color);
    gap: 8px;
    font-family: inherit;
    padding: 10px 20px;
    border-radius: 10px 10px 0px 0px;
    border-right: 2px solid #E4E4E4;
    border-top: 2px solid #E4E4E4;
    background: #FFF;
}

#tolkie-iframe-control-btn-close::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FFF;
}

#tolkie-svg-container-close svg {
    width: 18px;
    height: 18px;
}

#tolkie-iframe-all-function-btn {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    padding-left: 10px;
}

#tolkie-svg-container-all-function-btn svg {
    width: 20px;
    height: 20px;
}

/* Control Panel */
#tolkie-iframe-control-panel {
    display: flex;
    align-items: center;
    margin: 10px 0;
    position: relative;
}

#tolkie-iframe-control-panel-spacer {
    flex-grow: 1;
    visibility: hidden;
}

#tolkie-iframe-control-panel-left {
    container-type: inline-size;
    display: flex;
    justify-self: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#tolkie-iframe-control-panel-left>div>* {
    height: 100%;
}

.tolkie-iframe-control-panel-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 16px;
    padding-right: 16px;
    gap: 6px;
    border-radius: var(--default-border-radius);
    border: 1px solid #E4E4E4;
    background: #FFF;
    box-shadow: 0px 1.5px 2px 0px rgba(0, 0, 0, 0.05);
}

.tts-speed-wrapper {
    position: relative;
    display: inline-block;
}

.tts-speed-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #E4E4E4;
    background: #FFF;
    box-shadow: 0px 1.5px 2px 0px rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.tts-speed-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.tts-speed-wrapper:focus-within .tts-speed-display {
    outline: 2px solid var(--blue-link-color);
    outline-offset: 2px;
}

.tts-speed-select-arrow {
    width: 16px;
    height: 16px;
    transform: rotate(-90deg);
    flex-shrink: 0;
}

#dictionary-notification-ok-btn {
    background: var(--blue-link-color);
    color: #fff;
    font-size: 18px;
}

.tolkie-iframe-control-panel-border-three-container {
    display: flex;
    justify-content: space-around;
}

.tolkie-iframe-control-panel-border-three-content {
    height: 3px;
    width: 13px;
    background-color: var(--tolkie-primary-color-light);
}

.tolkie-iframe-control-panel-border-three-content.active {
    background-color: var(--tolkie-primary-color);
}

.tolkie-iframe-control-panel-border-three-content#one {
    border-radius: 0px 0px 0px 1px;
}

.tolkie-iframe-control-panel-border-three-content#two {
    border-radius: 0px;
    margin: 0 3px;
}

.tolkie-iframe-control-panel-border-three-content#three {
    border-radius: 0px 0px 1px 0px;
}

#tolkie-iframe-control-panel-lan-code {
    color: var(--tolkie-primary-color);
    font-size: 16px;
    font-weight: 400;
}

#tolkie-svg-container-dropdown svg {
    width: 11px;
    height: 7px;
}

.tolkie-iframe-title {
    font-size: var(--tolkie-font-size-28);
    font-style: normal;
    font-weight: 600;
    line-height: 1.5;
}

.tolkie-iframe-title[data-i18n="translatePage.title"] {
    margin-bottom: 0;
}

#tolkie-iframe-container-scrollable {
    padding-top: 3px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 20px;
    overflow: visible;
}

#tolkie-iframe-simple-explanation-container {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #D7D7D7;
    min-height: 500px!important;
}

#tolkie-iframe-simple-explanation-decision-flow {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-y: auto;
    border-bottom: 1px solid #D7D7D7;
}

.tolkie-iframe-simple-explanation-decision-flow-wrapper-small-screen {
    display: flex;
    height: 50px!important;
    margin-top: 10px;
    padding: 0 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tolkie-iframe-simple-explanation-decision-flow-wrapper-small-screen:hover {
    border: none!important;
    background: none!important;
    box-shadow: none!important;
}

.tolkie-iframe-simple-explanation-decision-flow-wrapper {
    display: none;
}

.tolkie-iframe-simple-explanation-decision-flow-wrapper-small-screen:last-child {
    border-bottom: 2px solid #000;
    font-weight: 700;
}

#tolkie-iframe-simple-explanation-decision-flow h3,
#tolkie-iframe-simple-explanation-decision-flow .tolkie-iframe-simple-explanation-step-title {
    font-size: var(--tolkie-font-size-11);
    font-style: normal;
    font-weight: inherit;
    padding: 0;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 156px;
}

.tolkie-iframe-simple-explanation-decision-flow-wrapper h3:last-child,
.tolkie-iframe-simple-explanation-decision-flow-wrapper-small-screen .tolkie-iframe-simple-explanation-step-title:last-child {
    font-weight: 700;
}

/* #tolkie-iframe-simple-explanation-decision-flow button {
    display: none;
} */

#tolkie-iframe-simple-explanation-decision-flow button:hover,
#tolkie-iframe-simple-explanation-footer-back-button:hover {
    border: 1px solid #D7D7D7;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), #FFF;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.10);
}

#tolkie-iframe-simple-explanation-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 24px 16px;
    flex: 1;
}

#tolkie-iframe-simple-explanation-container-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#tolkie-iframe-simple-explanation-content-title {
    font-size: var(--tolkie-font-size-17);
    font-style: normal;
    font-weight: 700;
    padding: 0;
    margin: 0;
}

#tolkie-iframe-simple-explanation-content-title:focus,
#tolkie-iframe-simple-explanation-content-title:focus-visible {
    outline: none;
    box-shadow: none;
}

#tolkie-iframe-simple-explanation-content-body {
    font-size: var(--tolkie-font-size-17);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    padding: 24px;
    margin: 0;
    border-radius: 12px;
    background: var(--lightest-green-color);
}

#tolkie-iframe-simple-explanation-content-body p {
    margin: 0;
}

#tolkie-iframe-simple-explanation-container-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#tolkie-iframe-simple-explanation-content-choices-title {
    font-size: var(--tolkie-font-size-13);
    font-style: normal;
    font-weight: 400;
    padding: 0;
    margin: 0;
}

#tolkie-iframe-simple-explanation-content-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#tolkie-iframe-simple-explanation-content-choices button {
    display: flex;
    padding: 12px 16px;
    align-items: center;
    gap: 8px;
    border-radius: 100px;
    border: 1px solid #D7D7D7;
    background: #FFF;

    font-size: var(--tolkie-font-size-11);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    color: #000;
}

#tolkie-iframe-simple-explanation-content-choices button:hover {
    border: 1px solid var(--dark-green-color);
    background: var(--lightest-green-color);
    color: var(--dark-green-color);
}

#tolkie-iframe-simple-explanation-content-choices button svg {
    height: 16px;
    width: 16px;
}

#tolkie-iframe-simple-explanation-footer {
    display: flex;
    flex-wrap: wrap-reverse;
    padding: 24px 0 4px 0;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

#tolkie-iframe-simple-explanation-footer-main-buttons-container {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

#tolkie-iframe-simple-explanation-footer-main-buttons-container button {
    display: flex;
    padding: 12px 16px;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    font-size: var(--tolkie-font-size-13);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
}

#tolkie-iframe-simple-explanation-footer button svg {
    width: 20px;
    height: 20px;
}

#tolkie-iframe-simple-explanation-footer-back-button {
    border: 1px solid #D7D7D7;
    background: #FFF;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.10);
    color: #000;
}

#tolkie-iframe-simple-explanation-footer-done-button {
    border: 1px solid var(--dark-green-color);
    background: var(--dark-green-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.10);
    color: var(--lightest-green-color);
}

#tolkie-iframe-simple-explanation-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 42px;
    width: 100%;
}

#tolkie-iframe-simple-explanation-error-message {
    margin: 0;
    font-size: var(--tolkie-font-size-17);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

#tolkie-iframe-disclaimer-text-container button {
    display: inline;
    padding: 0;
    margin: 0;
    font-size: inherit;
}

#tolkie-iframe-summary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#tolkie-iframe-menu-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tolkie-iframe-menu-card-container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.tolkie-iframe-menu-card-container {
    display: flex;
    flex-wrap: wrap;
}

.tolkie-iframe-menu-card-container-grid,
.tolkie-iframe-menu-card-container {
    gap: 12px;
}

#tolkie-iframe-dictionary-container,
#tolkie-iframe-dictionary-container-content {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    padding: 10px 0;
}

#tolkie-iframe-font-size-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

#tolkie-iframe-dictionary-notification-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 20px;
}

.tolkie-iframe-video-container {
    width: 100%;
    height: auto;
    max-width: 250px;
}

.tolkie-iframe-video-container .bb_iawr {
    border-radius: 12px;
}

.tolkie-iframe-menu-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #FFF;
    border: 1px solid #E5E5E5;
    gap: 10px;
}

.tolkie-iframe-menu-card:hover,
.tolkie-iframe-control-panel-btn:hover,
#tolkie-iframe-tts-click-and-play-button:hover,
#tolkie-iframe-tts-setting-btn:hover {
    border: 1.3px solid var(--dark-green-color);
    background: var(--lightest-green-color);
    box-shadow: 0px 1.5px 2px 0px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tolkie-iframe-menu-card .tolkie-svg-container svg {
    transition: color 0.3s ease;
}

.tolkie-iframe-menu-card:hover .tolkie-svg-container svg {
    color: var(--dark-green-color);
}

.tolkie-iframe-menu-card:hover #dyslexic-font-icon {
    color: var(--dark-green-color);
}

.tolkie-iframe-language-btn:hover {
    background: var(--lightest-green-color);
    border-radius: 3px;
}

.tolkie-iframe-menu-card[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
    background: #F5F3F3;
}

.tolkie-iframe-menu-card-big {
    min-width: 100%;
    box-shadow: 0px 1.5px 2px 0px rgba(0, 0, 0, 0.05);
}

.tolkie-iframe-menu-card-small {
    min-width: 200px;
    width: 100%;
}

.tolkie-iframe-menu-card.tolkie-iframe-menu-card-small {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    height: auto;
    padding: 13px 15px;
}

.tolkie-iframe-menu-card.tolkie-iframe-menu-card-small svg {
    height: 25px;
    width: 25px;
}

.tolkie-iframe-menu-card svg {
    width: 100px;
    height: 35px;
}

#dyslexic-font-icon {
    font-family: 'opendyslexic', sans-serif;
    font-size: 35px;
    line-height: 1;
    color: var(--tolkie-primary-color);
    transition: color 0.3s ease;
}

.tolkie-iframe-menu-card-title {
    font-size: var(--tolkie-font-size-16);
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.tolkie-iframe-disclaimer-text-underline {
    text-decoration-line: underline;
    text-decoration-style: solid;
    font-weight: 400;

}

.tolkie-iframe-ul {
    margin: 0;
    padding-left: 20px;
}

.tolkie-iframe-ul li {
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Font Size Page Start */
.tolkie-iframe-font-size-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tolkie-iframe-font-size-card svg {
    color: var(--tolkie-primary-color);
}

.tolkie-iframe-font-size-card .tolkie-svg-container {
    padding: 18.5px 20px;
    border-radius: 12px;
    border: 1px solid #C7C7C7;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tolkie-iframe-font-size-card.active .tolkie-svg-container {
    border: 1px solid var(--tolkie-primary-color);
    background: var(--tolkie-primary-color);
}

.tolkie-iframe-font-size-card.active svg {
    color: #fff;
}

#tolkie-iframe-control-btn-font-size {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#tolkie-iframe-tts-control-btn,
#tolkie-iframe-control-btn-font-size {
    min-height: 39px;
}

#tolkie-svg-container-font-size svg {
    width: 18px;
    height: 18px;
}

#tolkie-svg-container-font-size-small svg {
    width: 12px;
    height: 13px;
}

#tolkie-svg-container-font-size-medium svg {
    width: 25px;
    height: 27px;
}

#tolkie-svg-container-font-size-big svg {
    width: 40px;
    height: 43px;
}

/* Dictionary Page Start */

#tolkie-iframe-dictionary-img-container {
    display: flex;
    justify-content: center;
}

#tolkie-img-container-dictionary img {
    height: 135px;
    width: auto;
    border-radius: 20px;
}

#tolkie-iframe-dictionary-container h1,
#tolkie-iframe-summary-container h1,
#tolkie-iframe-dictionary-container h2,
#tolkie-iframe-summary-container h2,
#tolkie-iframe-dictionary-container p,
#tolkie-iframe-summary-container p {
    margin: 0;
}

.tolkie-iframe-margin-top-0 {
    margin-top: 0;
}

#tolkie-iframe-settings-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#tolkie-iframe-dictionary-control-definitions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#tolkie-iframe-dictionary-control-definitions-left svg {
    width: 11px;
    height: 7px;
    transform: rotate(90deg);
}

#tolkie-iframe-dictionary-control-definitions-right svg {
    width: 11px;
    height: 7px;
    transform: rotate(-90deg);
}

#tolkie-iframe-dictionary-control-definitions-left.disabled,
#tolkie-iframe-dictionary-control-definitions-right.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#tolkie-iframe-dictionary-control-definitions-dots {
    display: flex;
    gap: 10px;
}

.tolkie-iframe-dictionary-control-definition-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--default-border-radius);
    background: var(--tolkie-primary-color-light);
    padding: 0;
}

.tolkie-iframe-dictionary-control-definition-dot.active {
    background: var(--tolkie-primary-color);
}

#tolkie-iframe-feedback-form-container form {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 40px;
}

#feedback-error-banner {
    color: var(--dark-red-color);
    margin-right: 10px;
}

#tolkie-iframe-feedback-form-container form fieldset {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    gap: 12px;
    border: none;
}

#tolkie-iframe-feedback-form-container form label {
    font-size: var(--tolkie-font-size-16);
    align-items: center;
}

#tolkie-iframe-feedback-form-container form textarea {
    margin-top: 15px;
    border: none;
    background: #F1F1F1;
    border-radius: 4px;
    padding: 7px 9px;
    height: 80px;
    resize: none;
}

::placeholder {
    color: #000;
    opacity: 1;
    /* Firefox */
}

::-ms-input-placeholder {
    /* Edge 12-18 */
    color: #000;
}

#tolkie-iframe-feedback-form-container form button[type="submit"],
.tolkie-iframe-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: var(--default-border-radius);
    border: 2px solid var(--dark-green-color) !important;
    background: var(--dark-green-color);
    color: var(--lightest-green-color);
    padding: 10px 16px;
    font-size: inherit;
    width: fit-content;
    cursor: pointer;
    transition: background 0.3s ease;
}

#tolkie-iframe-feedback-form-container form button[type="submit"]:focus,
#tolkie-iframe-feedback-form-container form button[type="submit"]:focus-visible,
.tolkie-iframe-button:focus,
.tolkie-iframe-button:focus-visible {
    outline: 1px solid;
    box-shadow: 0 0 0 .2rem var(--dark-green-color) !important;
}

#tolkie-iframe-feedback-form-container form button[type="submit"]:hover,
.tolkie-iframe-button:hover {
    background: var(--dark-green-color);
    border: 2px solid var(--dark-green-color) !important;
}

.tolkie-iframe-absolute {
    position: absolute;
}

#tolkie-iframe-tts-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#tolkie-iframe-tts-container p {
    margin: 0;
}

#tolkie-iframe-tts-sentence-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    align-self: stretch;
    border-top: 1px solid #E5E5E5;
    border-bottom: 1px solid #E5E5E5;
    background: #FFF;
}

#tolkie-iframe-tts-sentence-container p {
    text-align: center;
}

#tolkie-iframe-tts-sentence-container span {
    position: relative;
    z-index: 1;
}

#tolkie-iframe-tts-control-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#tolkie-iframe-tts-control-btn-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

#tolkie-iframe-tts-back-btn[aria-disabled="true"],
#tolkie-iframe-tts-forward-btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
}

#tolkie-iframe-tts-back-btn svg,
#tolkie-iframe-tts-forward-btn svg {
    width: 22px;
    height: 23px;
}

#tts-button-container[disabled="true"] #tolkie-iframe-tts-control-btn {
    cursor: not-allowed;
    opacity: 0.5;
}

#tolkie-iframe-tts-control-btn.tolkie-iframe-tts-active-border {
    background-color: var(--tolkie-primary-color);
}

#tolkie-iframe-tts-control-btn svg,
#tolkie-iframe-tts-control-btn.tolkie-iframe-tts-active-border svg {
    width: 20px;
    height: 20px;
}

.tolkie-iframe-tts-btn {
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tolkie-iframe-tts-btn svg {
    width: 32px;
    height: 32px;
}

#tolkie-iframe-tts-play-btn {
    width: 77px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 36px;
    background: var(--lightest-green-color);
    position: relative;
}

#tolkie-iframe-tts-play-btn[data-i18n-label="tts.Playing"][data-high-contrast-border="true"] {
    border: 2px solid var(--dark-orange-color);
}

#tolkie-iframe-tts-play-btn[data-i18n-label="tts.Loading"][data-high-contrast-border="true"] {
    border: 2px solid rgba(10, 10, 10);
}

#tolkie-iframe-tts-play-btn[data-high-contrast-border="true"] {
    border: 2px solid var(--dark-green-color);
}

#tolkie-iframe-tts-play-btn:focus,
#tolkie-iframe-tts-play-btn:focus-visible {
    outline-offset: 0.3em;
}

#tolkie-iframe-tts-play-btn[data-i18n-label="tts.Playing"] {
    background: var(--lightest-orange-color);
}

#tolkie-iframe-tts-play-btn[data-i18n-label="tts.Loading"] {
    background: var(--lightest-gray-color);
}

#tolkie-iframe-tts-play-btn svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.tolkie-iframe-tts-active-word-play {
    border-radius: var(--default-border-radius);
    padding: 2px 6px;
}

#tolkie-iframe-tts-active-word {
    background: rgba(45, 169, 53, 0.12);
}

#tolkie-iframe-tts-click-and-play-button,
#tolkie-iframe-tts-setting-btn {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: var(--default-border-radius);
    border: 1px solid #E4E4E4;
    /* margin-left: 10px; */
    align-self: stretch;
    box-shadow: 0px 1.5px 2px 0px rgba(0, 0, 0, 0.05);
}

#tolkie-iframe-tts-click-and-play-button svg,
#tolkie-iframe-tts-setting-btn svg {
    width: 18px;
    height: 18px;
}

#tolkie-iframe-tts-setting-btn svg {
    height: 24px;
    width: 24px;
}

#tolkie-iframe-control-btn-translate,
#tolkie-iframe-tts-speed-combo {
    position: relative;
}

#tolkie-iframe-tts-speed-combo {
    height: 100% !important;
}

/* Listbox: always show full label, never short */
.combo-menu .tts-speed-label-short {
    display: none !important;
}

.combo-menu .tts-speed-label-full {
    display: inline;
}

/* Combo button: responsive full/short by viewport */
#tolkie-iframe-tts-speed-combo .tts-speed-label-short {
    display: inline;
}

#tolkie-iframe-tts-speed-combo .tts-speed-label-full {
    display: none;
}

@media screen and (min-width: 768px) {
    #tolkie-iframe-tts-speed-combo .tts-speed-label-full {
        display: inline;
    }

    #tolkie-iframe-tts-speed-combo .tts-speed-label-short {
        display: none;
    }
}

.tolkie-control-tts-label-full {
    display: none;
}

@media screen and (min-width: 600px) {
    .tolkie-control-tts-label-full {
        display: inline;
    }
}

#tolkie-iframe-control-btn-translate ul {
    margin: 0;
    position: absolute;
    top: 35px;
    left: 0;
    border-radius: 1px;
    border-bottom: 2px solid var(--tolkie-primary-color);
    background: #FFF;
    box-shadow: 0px 2px 5px -1px rgba(50, 50, 93, 0.25);
    height: auto;
    max-height: 171px;
    width: fit-content;
    padding: 10px;
    list-style: none;
    overflow-y: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    display: none;
    z-index: 2;
}

.combo svg,
#tolkie-svg-container-flag svg {
    height: 24px;
    width: 24px;
}

#tolkie-iframe-language-dropdown-container li {
    width: 100%;
    display: flex;
}

.tolkie-iframe-language-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tolkie-iframe-language-btn:focus {
    outline: none;
    box-shadow: none;
    border: inherit;
}

.tolkie-iframe-language-btn:focus-visible {
    box-shadow: 0 0 0 .25rem white;
    outline: .375rem double black;
    border-radius: .125rem;
}

.tolkie-iframe-language-btn svg {
    width: 25px;
    max-height: 20px;
}

.tolkie-iframe-language-btn span {
    white-space: nowrap;
}

/* Contact Page */
#tolkie-iframe-contact-container p:first-child {
    margin-top: 0;
}

#tolkie-iframe-contact-phone-number,
#tolkie-iframe-contact-email {
    margin: 0;
}

#tolkie-iframe-contact-container p:last-child {
    margin-top: 0;
}

/* TTS */
.tolkie-iframe-highlight-sentence-word-paused,
.tolkie-iframe-highlight-sentence-word,
.tolkie-iframe-highlight-element {
    position: relative;
    z-index: 0 !important;
}

.tolkie-iframe-highlight-sentence-word-paused::after,
.tolkie-iframe-highlight-sentence-word::after,
.tolkie-iframe-highlight-element::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -6px;
    right: -6px;
    bottom: -3px;
    border-radius: 8px;
    background: var(--lightest-green-color);
    opacity: 0.88;
    z-index: -1 !important;
    pointer-events: none;
}

.tolkie-iframe-highlight-sentence-word::after {
    background: var(--lightest-orange-color);
    opacity: 0.88;
}

.tolkie-iframe-highlight-sentence-word-paused[data-high-contrast-border="true"]::after,
.tolkie-iframe-highlight-element[data-high-contrast-border="true"]::after {
    box-shadow: 0 0 0 2px var(--dark-green-color);
}

.tolkie-iframe-highlight-sentence-word[data-high-contrast-border="true"]::after,
.tolkie-iframe-highlight-element[data-high-contrast-border="true"]::after {
    box-shadow: 0 0 0 2px var(--dark-orange-color);
}

/* Settings page */
.setting-container {
    display: grid;
    grid-template-columns: 4fr 1fr;
    align-items: center;
    gap: 10px;
}

.setting-text-container * {
    margin: 0;
}

.setting-button-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tolkie-iframe-segmented-button {
    display: grid;
    width: fit-content;
    grid-auto-flow: column;
    grid-auto-columns: minmax(48px, 1fr);
    user-select: none;
}

.tolkie-iframe-segmented-button>label {
    line-height: 0;
}

[role="switch"] {
    padding: 0;
    padding: 5px;
    border: 0;
    border-radius: 1rem;
    background-color: #757580;
}

[role="switch"][aria-checked="true"] {
    background-color: var(--tolkie-primary-color);
}

[role="switch"] span {
    color: #fff;
    padding: 0.1rem;
    pointer-events: none;
    border-radius: 2rem;
}

[role="switch"][aria-checked="false"] :last-child {
    padding-left: .2em;
}

[role="switch"][aria-checked="true"] :last-child,
[role="switch"][aria-checked="false"] :first-child {
    background: #fff;
}

/* Spinner */
.spinner-container-max-height {
    height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-container-max-height.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tolkie-iframe-simple-explanation-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner-container-max-height #spinner,
#spinner {
    box-sizing: border-box;
    stroke: var(--tolkie-primary-color);
    stroke-width: 3px;
    -webkit-transform-origin: 50%;
    transform-origin: 50%;
    -webkit-animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
    animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
}

.spinner-container-max-height.tolkie-iframe-loading-animation-paused #spinner,
.tolkie-iframe-loading-animation-paused #spinner {
    -webkit-animation: none;
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .spinner-container-max-height #spinner,
    #spinner {
        -webkit-animation: none;
        animation: none;
    }
}

.tolkie-iframe-simple-explanation-pause-loading-btn {
    min-width: 24px;
    min-height: 24px;
    padding: 8px 12px;
}

.tolkie-iframe-simple-explanation-pause-loading-btn:focus,
.tolkie-iframe-simple-explanation-pause-loading-btn:focus-visible {
    outline: 1px solid;
    box-shadow: 0 0 0 .2rem var(--tolkie-primary-color) !important;
}

.tolkie-iframe-loading-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.tolkie-iframe-loading-pause-btn {
    min-width: 24px;
    min-height: 24px;
    padding: 8px 12px;
}

.tolkie-iframe-loading-pause-btn:focus,
.tolkie-iframe-loading-pause-btn:focus-visible {
    outline: 1px solid;
    box-shadow: 0 0 0 .2rem var(--tolkie-primary-color) !important;
}

.tolkie-iframe-what-is-tolkie-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}

.tolkie-iframe-what-is-tolkie-column {
    display: flex;
    flex-direction: column;
}

.tolkie-iframe-what-is-tolkie-img-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tolkie-iframe-what-is-tolkie-img-container svg:first-child {
    max-width: 300px;
    width: 90%;
    height: 150px;
}

.tolkie-iframe-what-is-tolkie-img-container svg:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 45px;
    width: 100%;
    height: 100%;
    max-height: 45px;
}

/* Small Notification */
.tolkie-iframe-small-notification-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px !important;
    background: none !important;
    padding: 0 !important;
    margin-bottom: 10px;
}

.tolkie-iframe-small-notification-inner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 600px !important;
    border-radius: 100px;
    background-color: #fff;
    padding: 0 10px;
    border: 2px solid #E4E4E4;
    gap: 15px;
}

#tolkie-iframe-small-notification-close-btn[data-high-contrast-border="true"] {
    border: 2px solid var(--dark-red-color) !important;
}

#tolkie-iframe-small-notification-close-btn {
    color: var(--dark-red-color);
    background-color: var(--lightest-red-color);
    border: none !important;
    padding: 10px;
    height: fit-content;
}

#tolkie-iframe-small-notification-close-btn svg {
    width: 15px;
    height: 15px;
}

#tolkie-iframe-small-notification-close-btn span {
    display: none;
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    to {
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@keyframes rotate {
    from {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    to {
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@-webkit-keyframes line {
    0% {
        stroke-dasharray: 2, 85.964;
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    50% {
        stroke-dasharray: 65.973, 21.9911;
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dasharray: 2, 85.964;
        stroke-dashoffset: -65.973;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
}

@keyframes line {
    0% {
        stroke-dasharray: 2, 85.964;
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }

    50% {
        stroke-dasharray: 65.973, 21.9911;
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dasharray: 2, 85.964;
        stroke-dashoffset: -65.973;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
}

/* TTS In Iframe */
.tolkie-iframe-tts-active-sentence {
    background-color: lavender;
    color: black;
}

.tolkie-iframe-highlight-word {
    background-color: PapayaWhip;
}

/* Error Banner */
.tolkie-iframe-error-banner {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px;
    background-color: var(--lightest-red-color);
    color: var(--dark-red-color);
    border: 1px solid var(--dark-red-color);
    border-radius: 4px;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    animation: bounce 0.5s ease;
}

.tolkie-iframe-error-banner p {
    margin: 0;
    padding-right: 20px;
}

#tolkie-error-banner-close {
    background: none;
    border: none;
    color: var(--dark-red-color);
    font-size: 20px;
    cursor: pointer;
}

#tolkie-error-banner-close:hover {
    color: var(--dark-red-color);
}

#tolkie-iframe-follow-link-buttons {
    display: flex;
    gap: 12px;
}

#tolkie-iframe-follow-link-buttons button:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FFF;
    box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(199, 199, 199, 0.50) !important;
    gap: 10px;
    color: #000;
}

/* Translate Page */
#tolkie-translate-languages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 4fr));
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

#tolkie-iframe-translate-page-container button {
    display: flex;
    padding: 10px 20px;
    align-items: center;
    gap: 15px;
    border-radius: 10px;
    border: 1px solid #E5E5E5;
}

#tolkie-iframe-translate-page-container button:hover,
#tolkie-iframe-translate-page-container button:focus,
#tolkie-iframe-translate-page-container button:focus-visible {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

#tolkie-iframe-translate-page-container button .tolkie-svg-container svg {
    width: 58px;
    height: 46px;
}

#tolkie-iframe-translate-page-container button #tolkie-svg-container-revert-translation svg {
    width: 20px;
    height: 20px;
}

#tolkie-iframe-translate-page-container button .flex-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#tolkie-revert-translation-btn {
    padding: 7px 17px;
    margin-bottom: 35px;
}

#tolkie-translate-page-change-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#tolkie-translate-page-change-panel .tolkie-svg-container-flag svg {
    width: 103px;
    height: 62px;
}

#tolkie-translate-page-change-panel .button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#tolkie-translate-page-change-panel .button-container button {
    display: flex;
    padding: 10px 20px;
    align-items: center;
    gap: 12px;
    border-radius: var(--default-border-radius);
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-change-btn {
    color: var(--blue-link-color);
    border: 2px solid var(--blue-link-color);
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-change-btn:hover,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-change-btn:focus,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-change-btn:focus-visible {
    background: var(--blue-link-color);
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-cancel-btn {
    color: #fff;
    border: 2px solid var(--dark-red-color);
    background: var(--dark-red-color);
    border-radius: var(--default-border-radius);
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-cancel-btn:hover,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-cancel-btn:focus,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-cancel-btn:focus-visible {
    background: var(--dark-red-color);
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-done-btn {
    color: #fff;
    border: 2px solid #4CB543;
    background: #6FC667;
}

#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-done-btn:hover,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-done-btn:focus,
#tolkie-translate-page-change-panel .button-container #tolkie-translate-page-done-btn:focus-visible {
    background: #4CB543;
}

#tolkie-translate-page-change-panel .button-container button svg {
    width: 15px;
    height: 15px;
}

/* Flags */
svg:has(use[alt="日本語"]),
svg:has(use[alt="한국어 (韓國語)"]) {
    outline: 0.1px solid #0000003d;
}

svg:has(use[alt="Suomi"]) {
    outline: 0.1px solid #0000003d;
}

@media screen and (min-width: 340px) {
    .tolkie-iframe-menu-card-container-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media screen and (min-width: 450px) {
    .tolkie-iframe-menu-card-container-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media screen and (min-width: 460px) {
    .tolkie-iframe-small-notification-inner-container {
        padding: 0 20px;
    }

    #tolkie-iframe-small-notification-close-btn {
        padding: 10px 20px;
    }

    #tolkie-iframe-small-notification-close-btn span {
        display: block;
    }
}

@media screen and (min-width: 505px) {
    .tolkie-iframe-menu-card-big {
        max-width: calc(33.333% - 6px);
    }
}

@media screen and (min-width: 610px) {
    .tolkie-iframe-what-is-tolkie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    :root {
        --tolkie-font-size-8: 10px;
        --tolkie-font-size-10: 12px;
        --tolkie-font-size-11: 13px;
        --tolkie-font-size-12: 14px;
        --tolkie-font-size-13: 15px;
        --tolkie-font-size-14: 16px;
        --tolkie-font-size-15: 17px;
        --tolkie-font-size-16: 18px;
        --tolkie-font-size-17: 19px;
        --tolkie-font-size-18: 20px;
        --tolkie-font-size-19: 21px;
        --tolkie-font-size-20: 22px;
        --tolkie-font-size-23: 25px;
        --tolkie-font-size-25: 27px;
        --tolkie-font-size-28: 30px;
    }

    #tolkie-iframe-inner-container>div:not(#navigation-panel-container):not(#navigation-panel-container-back) {
        padding-left: 15px;
        padding-right: 15px;
    }

    #tolkie-svg-container-close svg {
        height: 20px;
        width: 20px;
    }

    #tolkie-svg-container-menu-dictionary svg {
        width: 51px;
    }

    #tolkie-svg-container-menu-tts svg,
    #tolkie-svg-container-menu-summary svg,
    #tolkie-svg-container-menu-font-size svg,
    #tolkie-svg-container-menu-translate-page svg {
        height: 37px;
    }

    .tolkie-iframe-menu-card.tolkie-iframe-menu-card-small {
        padding: 15px 17px;
    }

    .tolkie-iframe-menu-card.tolkie-iframe-menu-card-small svg {
        height: 27px;
    }

    #tolkie-iframe-font-size-container {
        gap: 35px;
    }

    #tolkie-svg-container-font-size-small svg {
        width: 14px;
    }

    #tolkie-svg-container-font-size-medium svg {
        height: 27px;
        width: 25px;
    }

    #tolkie-svg-container-font-size-big svg {
        height: 42px;
    }

    #tolkie-img-container-dictionary img {
        height: 150px;
    }

    #tolkie-iframe-dictionary-control-definitions div>svg {
        height: 9px;
        width: 13px;
    }

    .tolkie-iframe-dictionary-control-definition-dot {
        height: 9px;
        width: 9px;
    }

    #tolkie-iframe-tts-control-btn svg,
    #tolkie-iframe-tts-control-btn.tolkie-iframe-tts-active-border svg {
        width: 22px;
        height: 22px;
    }

    .tolkie-iframe-video-container {
        max-width: 410px !important;
    }
}

@media screen and (min-width: 600px) {
    .tolkie-iframe-menu-card-small {
        max-width: calc(50% - 6px);
    }
}

@media screen and (min-width: 1000px) {
    :root {
        --tolkie-font-size-8: 12px;
        --tolkie-font-size-10: 14px;
        --tolkie-font-size-11: 15px;
        --tolkie-font-size-12: 16px;
        --tolkie-font-size-13: 17px;
        --tolkie-font-size-14: 18px;
        --tolkie-font-size-15: 19px;
        --tolkie-font-size-16: 20px;
        --tolkie-font-size-17: 21px;
        --tolkie-font-size-18: 22px;
        --tolkie-font-size-19: 23px;
        --tolkie-font-size-20: 24px;
        --tolkie-font-size-23: 27px;
        --tolkie-font-size-25: 29px;
        --tolkie-font-size-28: 32px;
    }

    #tolkie-iframe-simple-explanation-container {
        flex-direction: row;
    }

    #tolkie-iframe-simple-explanation-decision-flow {
        flex-direction: column;
        border-right: 1px solid #D7D7D7;
        border-bottom: none;
        max-width: 280px!important;
    }

    .tolkie-iframe-simple-explanation-decision-flow-wrapper-small-screen {
        display: none!important;
    }

    .tolkie-iframe-simple-explanation-decision-flow-wrapper {
        display: flex;
        padding: 12px 16px 12px 0;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    #tolkie-iframe-simple-explanation-decision-flow h3:last-child,
    #tolkie-iframe-simple-explanation-decision-flow .tolkie-iframe-simple-explanation-step-title:last-child {
        font-weight: 700;
    }

    #tolkie-iframe-simple-explanation-decision-flow h3,
    #tolkie-iframe-simple-explanation-decision-flow .tolkie-iframe-simple-explanation-step-title {
        max-width: none;
    }

    #tolkie-iframe-simple-explanation-decision-flow button {
        display: flex;
        padding: 8px 12px;
        align-items: center;
        gap: 8px;
        border-radius: var(--default-border-radius);
        border: 1px solid #D7D7D7;
        background: #FFF;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.10);
        font-size: var(--tolkie-font-size-11);
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        color: #000;
        cursor: pointer;
    }

    #tolkie-iframe-simple-explanation-content {
        padding: 24px 42px;
    }

    #tolkie-iframe-inner-container>div:not(#navigation-panel-container):not(#navigation-panel-container-back) {
        padding-left: 20px;
        padding-right: 20px;
    }

    #tolkie-svg-container-close svg {
        height: 22px;
        width: 22px;
    }

    #tolkie-svg-container-menu-dictionary svg {
        width: 53px;
    }

    #tolkie-svg-container-menu-tts svg,
    #tolkie-svg-container-menu-summary svg,
    #tolkie-svg-container-menu-font-size svg,
    #tolkie-svg-container-menu-translate-page svg {
        height: 39px;
    }

    .tolkie-iframe-menu-card.tolkie-iframe-menu-card-small {
        padding: 17px 19px;
    }

    .tolkie-iframe-menu-card.tolkie-iframe-menu-card-small svg {
        height: 29px;
    }

    #tolkie-iframe-font-size-container {
        gap: 50px;
    }

    #tolkie-svg-container-font-size-small svg {
        width: 16px;
    }

    #tolkie-svg-container-font-size-medium svg {
        height: 29px;
        width: 27px;
    }

    #tolkie-svg-container-font-size-big svg {
        height: 44px;
    }

    #tolkie-img-container-dictionary img {
        height: 200px;
        width: auto;
    }

    #tolkie-iframe-dictionary-control-definitions div>svg {
        height: 11px;
        width: 15px;
    }

    .tolkie-iframe-dictionary-control-definition-dot {
        height: 10px;
        width: 10px;
    }

    #tolkie-iframe-tts-control-btn svg,
    #tolkie-iframe-tts-control-btn.tolkie-iframe-tts-active-border svg {
        width: 24px;
        height: 24px;
    }
}

/* Remove lines when zoom in */
#tolkie-iframe-inner-container>div:not(:last-child) {
    margin-bottom: -1px;
}

@keyframes bounce {
    0% {
        transform: translate(0px, 0px);
    }

    15% {
        transform: translate(0px, -25px);
    }

    30% {
        transform: translate(0px, 0px);
    }

    45% {
        transform: translate(0px, -15px);
    }

    60% {
        transform: translate(0px, 0px);
    }

    75% {
        transform: translate(0px, -5px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

.tolkie-rtl {
    direction: rtl;
}

tolkie-iframe-menu-card:has(.tolkie-rtl),
#tolkie-iframe-disclaimer-text-container:has(.tolkie-rtl),
#tolkie-iframe-feedback-form-container label:has(.tolkie-rtl),
#tolkie-iframe-settings-container:has(.tolkie-rtl) {
    direction: rtl;
}

#tolkie-iframe-control-btn-translate,
#tolkie-iframe-tts-speed-combo {
    padding: 8px 35px 8px 16px;
}

.combo *,
.combo *::before,
.combo *::after {
    box-sizing: border-box;
}

.combo {
    display: block;
    position: relative;
}

.combo.open {
    position: relative;
}

.combo.open .combo-menu {
    position: absolute;
    width: 90vw;
    max-width: 300px !important;
}

#tolkie-iframe-control-btn-translate::after,
#tolkie-iframe-tts-speed-combo::after {
    border-bottom: 2px solid rgb(0 0 0);
    border-right: 2px solid rgb(0 0 0);
    content: "";
    display: block;
    height: 7px;
    pointer-events: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translate(0, -65%) rotate(45deg);
    width: 7px;
}

.combo-input {
    display: flex;
    width: fit-content;
    cursor: pointer;
}

.open .combo-input {
    border-radius: 4px 4px 0 0;
}

.combo-label {
    display: block;
    font-weight: 100;
    margin-bottom: 0.25em;
    font-size: 1.2em;
}

.combo-menu {
    flex-direction: column;
    background-color: #fff;
    border: 1px solid var(--tolkie-primary-color);
    border-bottom: 2px solid var(--tolkie-primary-color);
    border-radius: 1px;
    display: none;
    height: auto;
    max-height: 161px;
    overflow-y: scroll;
    left: 0;
    position: absolute;
    padding: 10px;
    top: 100%;
    width: 100%;
    z-index: 100;
    box-shadow: 0px 2px 5px -1px rgba(50, 50, 93, 0.25);
}

.open .combo-menu {
    display: block;
}

/* Combo with dropdown opening above the button */
#tolkie-iframe-tts-speed-dropdown[data-dropdown-position="above"] .combo-menu {
    top: auto;
    bottom: 100%;
    border-radius: 4px 4px 0 0;
}

#tolkie-iframe-tts-speed-dropdown[data-dropdown-position="above"].open .combo-input {
    border-radius: 0 0 4px 4px;
}

.combo-option {
    padding: 10px 12px 12px;
    white-space: nowrap;
    display: flex;
    gap: 12px;
    cursor: pointer;
}

.combo-option:hover {
    background-color: rgb(0 0 0 / 10%);
}

.combo-option.option-current {
    outline: 3px solid #0067b8;
    outline-offset: -3px;
}

.combo-option[aria-selected="true"] {
    padding-right: 30px;
    position: relative;
}

.combo-option[aria-selected="true"]::after {
    border-bottom: 2px solid #000;
    border-right: 2px solid #000;
    content: "";
    height: 16px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translate(0, -50%) rotate(45deg);
    width: 8px;
}

/* Visually hidden utility for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
