.aitmt-fallback-switcher-wrap {
    box-sizing: border-box;
    padding: 8px 16px;
    text-align: right;
    width: 100%;
    z-index: 99;
}

.aitmt-fallback-switcher-header,
.aitmt-fallback-switcher-footer {
    clear: both;
}

.aitmt-fallback-switcher-footer {
    margin-top: 10px;
}

.aitmt-fallback-switcher,
.aitmt-fallback-switcher-dropdown,
.aitmt-switcher,
.aitmt-switcher-dropdown {
    font: inherit;
}

.aitmt-fallback-switcher-dropdown,
.aitmt-switcher-dropdown {
    background: #fff;
    border: 1px solid currentColor;
    border-radius: 6px;
    box-sizing: border-box;
    color: inherit;
    display: inline-block;
    min-height: 36px;
    min-width: 112px;
    padding: 0;
    position: relative;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.aitmt-fallback-switcher-dropdown:hover,
.aitmt-fallback-switcher-dropdown:focus,
.aitmt-fallback-switcher-dropdown[open],
.aitmt-switcher-dropdown:hover,
.aitmt-switcher-dropdown:focus,
.aitmt-switcher-dropdown[open] {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.14);
    outline: 0;
}

.aitmt-fallback-switcher-dropdown-control,
.aitmt-switcher-dropdown-control {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.45em;
    list-style: none;
    min-height: 34px;
    padding: 4px 28px 4px 10px;
    position: relative;
    white-space: nowrap;
}

.aitmt-fallback-switcher-dropdown-control::-webkit-details-marker,
.aitmt-switcher-dropdown-control::-webkit-details-marker {
    display: none;
}

.aitmt-fallback-switcher-dropdown-control::after,
.aitmt-switcher-dropdown-control::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-40%);
}

.aitmt-fallback-switcher-dropdown-menu,
.aitmt-switcher-dropdown-menu {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
    box-sizing: border-box;
    display: grid;
    gap: 2px;
    left: 0;
    margin-top: 4px;
    min-width: 100%;
    padding: 5px;
    position: absolute;
    text-align: left;
    top: 100%;
    z-index: 99999;
}

.aitmt-fallback-switcher-dropdown-link,
.aitmt-switcher-dropdown-link {
    align-items: center;
    border-radius: 4px;
    color: inherit;
    display: flex;
    gap: 0.45em;
    line-height: 1.2;
    min-height: 30px;
    padding: 5px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.aitmt-fallback-switcher-dropdown-link:hover,
.aitmt-fallback-switcher-dropdown-link:focus,
.aitmt-switcher-dropdown-link:hover,
.aitmt-switcher-dropdown-link:focus,
.aitmt-fallback-switcher-dropdown-link.is-current,
.aitmt-switcher-dropdown-link.is-current {
    background: rgba(34, 113, 177, 0.1);
    outline: 0;
}

.aitmt-fallback-switcher-list,
.aitmt-switcher-list {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aitmt-switcher-orientation-vertical {
    align-items: stretch;
    flex-direction: column;
}

.aitmt-fallback-switcher-link,
.aitmt-switcher-link {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 6px;
    display: inline-flex;
    gap: 6px;
    line-height: 1.2;
    min-height: 32px;
    padding: 5px 9px;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.aitmt-fallback-switcher-link:hover,
.aitmt-fallback-switcher-link:focus,
.aitmt-switcher-link:hover,
.aitmt-switcher-link:focus {
    background: rgba(34, 113, 177, 0.08);
    border-color: #2271b1;
    outline: 0;
}

.aitmt-fallback-switcher-link.is-current,
.aitmt-switcher-link.is-current {
    font-weight: 700;
    opacity: 0.75;
}

.aitmt-switcher-layout-buttons .aitmt-fallback-switcher-link,
.aitmt-switcher-layout-flags_only .aitmt-fallback-switcher-link {
    justify-content: center;
    min-width: 36px;
}

.aitmt-switcher-layout-name_only .aitmt-fallback-flag,
.aitmt-switcher-layout-flags_only .aitmt-fallback-language-name,
.aitmt-switcher-layout-flags_only .aitmt-fallback-language-code {
    display: none;
}

.aitmt-menu-language-item > a,
.aitmt-menu-current-language > a {
    align-items: center;
    display: inline-flex;
    gap: 0.35em;
}

.aitmt-fallback-language-code,
.aitmt-language-code {
    font-size: 0.78em;
    opacity: 0.72;
}

.aitmt-flag,
.aitmt-fallback-flag {
    background: linear-gradient(135deg, #f6f7f7 0 50%, #c3c4c7 50% 100%);
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    box-sizing: border-box;
    display: inline-block;
    flex: 0 0 auto;
    height: 0.82em;
    min-height: 12px;
    min-width: 18px;
    overflow: hidden;
    position: relative;
    vertical-align: -0.08em;
    width: 1.22em;
}

.aitmt-flag-us {
    background: repeating-linear-gradient(to bottom, #b22234 0 7.69%, #fff 7.69% 15.38%);
}

.aitmt-flag-us::before {
    background: #3c3b6e;
    content: "";
    height: 54%;
    left: 0;
    position: absolute;
    top: 0;
    width: 42%;
}

.aitmt-flag-ru {
    background: linear-gradient(to bottom, #fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66% 100%);
}

.aitmt-flag-ge {
    background:
        linear-gradient(to right, transparent 0 43%, #e8112d 43% 57%, transparent 57% 100%),
        linear-gradient(to bottom, transparent 0 40%, #e8112d 40% 60%, transparent 60% 100%),
        #fff;
}

.aitmt-flag-de {
    background: linear-gradient(to bottom, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.aitmt-flag-fr {
    background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66% 100%);
}

.aitmt-flag-es {
    background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.aitmt-flag-it {
    background: linear-gradient(to right, #009246 0 33.33%, #fff 33.33% 66.66%, #ce2b37 66.66% 100%);
}

.aitmt-flag-pt {
    background: linear-gradient(to right, #006600 0 40%, #ff0000 40% 100%);
}

.aitmt-flag-cn {
    background: #de2910;
}

.aitmt-flag-cn::before {
    color: #ffde00;
    content: "в…";
    font-size: 9px;
    left: 2px;
    line-height: 1;
    position: absolute;
    top: 1px;
}

.aitmt-flag-jp {
    background: radial-gradient(circle at center, #bc002d 0 28%, transparent 29%), #fff;
}

.aitmt-flag-kr {
    background: radial-gradient(circle at center, #cd2e3a 0 24%, #0047a0 25% 45%, transparent 46%), #fff;
}

.aitmt-flag-ua {
    background: linear-gradient(to bottom, #0057b7 0 50%, #ffd700 50% 100%);
}

.aitmt-flag-tr {
    background: #e30a17;
}

.aitmt-flag-tr::before {
    color: #fff;
    content: "в—Џ";
    font-size: 12px;
    left: 4px;
    line-height: 1;
    position: absolute;
    top: 0;
}

.aitmt-flag-sa {
    background: #006c35;
}

.aitmt-flag-il {
    background: linear-gradient(to bottom, #fff 0 18%, #0038b8 18% 32%, #fff 32% 68%, #0038b8 68% 82%, #fff 82% 100%);
}

img.aitmt-flag,
img.aitmt-fallback-flag {
    background: none;
    display: inline-block;
    object-fit: cover;
}

.aitmt-elementor-switcher .aitmt-fallback-switcher-wrap {
    display: inline-block;
    padding: 0;
}

.aitmt-inline-editor-toolbar {
    align-items: center;
    background: rgba(29, 35, 39, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    bottom: 18px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
    box-sizing: border-box;
    color: #fff;
    display: flex;
    gap: 8px;
    left: 18px;
    max-width: calc(100vw - 36px);
    padding: 8px;
    position: fixed;
    z-index: 999999;
}

.aitmt-inline-editor-brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 6px;
    font-size: 12px;
    line-height: 1.2;
    max-width: 300px;
    text-decoration: none;
}

.aitmt-inline-editor-brand:hover,
.aitmt-inline-editor-brand:focus {
    color: #fff;
    text-decoration: underline;
}

.aitmt-inline-editor-brand img {
    background: #fff;
    border-radius: 4px;
    height: 22px;
    object-fit: contain;
    width: 22px;
}

.aitmt-inline-editor-toolbar button {
    background: #2271b1;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    min-height: 34px;
    padding: 6px 10px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.aitmt-inline-editor-toolbar button:hover,
.aitmt-inline-editor-toolbar button:focus {
    background: #135e96;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
    outline: 0;
}

.aitmt-inline-editor-toolbar button.is-active {
    background: #00a32a;
}

.aitmt-inline-editor-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 12px;
    max-width: 340px;
    padding: 4px 8px;
}

.aitmt-inline-editor-modal {
    align-items: center;
    backdrop-filter: blur(2px);
    background: rgba(0, 0, 0, 0.48);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 1000000;
}

.aitmt-inline-editor-modal.is-open {
    display: flex;
}

.aitmt-inline-editor-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    color: #1d2327;
    max-width: 760px;
    padding: 22px;
    width: min(760px, 100%);
}

.aitmt-inline-editor-dialog * {
    box-sizing: border-box;
}

.aitmt-inline-editor-dialog h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 12px;
}

.aitmt-inline-editor-textarea {
    border: 1px solid #8c8f94;
    border-radius: 8px;
    box-sizing: border-box;
    font: inherit;
    line-height: 1.45;
    min-height: 220px;
    padding: 12px 14px;
    resize: vertical;
    width: 100%;
}

.aitmt-inline-editor-notice {
    align-items: center;
    color: #50575e;
    display: flex;
    font-size: 13px;
    gap: 8px;
    min-height: 24px;
    padding-top: 8px;
}

.aitmt-inline-editor-modal.is-loading .aitmt-inline-editor-notice::before {
    animation: aitmt-inline-editor-spin 0.8s linear infinite;
    border: 2px solid #dcdcde;
    border-top-color: #2271b1;
    border-radius: 50%;
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

@keyframes aitmt-inline-editor-spin {
    to {
        transform: rotate(360deg);
    }
}

.aitmt-inline-editor-textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.16);
    outline: 0;
}

.aitmt-inline-editor-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.aitmt-inline-editor-dialog-actions button {
    background: #2271b1;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    min-height: 34px;
    padding: 7px 13px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.aitmt-inline-editor-dialog-actions button:hover,
.aitmt-inline-editor-dialog-actions button:focus {
    background: #135e96;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.18);
    outline: 0;
}

.aitmt-inline-editor-dialog-actions button.is-secondary {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    color: #1d2327;
}

.aitmt-inline-editor-dialog-actions button.is-secondary:hover,
.aitmt-inline-editor-dialog-actions button.is-secondary:focus {
    background: #fff;
    border-color: #8c8f94;
}

.aitmt-inline-editor-dialog-actions button.is-auto {
    background: #1e7e34;
}

.aitmt-inline-editor-dialog-actions button.is-auto:hover,
.aitmt-inline-editor-dialog-actions button.is-auto:focus {
    background: #166329;
}

.aitmt-inline-editor-dialog-actions button:disabled {
    cursor: wait;
    opacity: 0.65;
}

body.aitmt-editor-active .aitmt-editable {
    cursor: pointer;
    outline: 2px solid rgba(34, 113, 177, 0.7);
    outline-offset: 3px;
    transition: background-color 0.16s ease, outline-color 0.16s ease;
}

body.aitmt-editor-active .aitmt-editable:hover {
    background: rgba(34, 113, 177, 0.14);
}

@media (max-width: 640px) {
    .aitmt-inline-editor-toolbar {
        align-items: flex-start;
        bottom: 10px;
        flex-direction: column;
        left: 10px;
        right: 10px;
    }

    .aitmt-inline-editor-brand {
        max-width: none;
    }

    .aitmt-inline-editor-dialog {
        max-height: calc(100vh - 32px);
        overflow: auto;
        padding: 18px;
    }

    .aitmt-inline-editor-dialog-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
