
.yatp-language-select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.95);
    color: #18333f;
    font-weight: 600;
    padding: 0 10px;
}

.yatp-language-select:focus {
    outline: 2px solid #ffd98c;
    outline-offset: 1px;
}

.yatp-language-switcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    width: min(280px, calc(100vw - 24px));
    background-color: var(--yatp-accent-color, #a03a9e);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 14px 30px rgba(17, 61, 56, 0.35);
    backdrop-filter: blur(4px);
    animation: yatp-pop-in 360ms ease-out;
}

.yatp-language-switcher__label {
    color: #f6fffb;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.yatp-language-switcher__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.yatp-language-switcher__header .yatp-language-switcher__flag {
    margin-left: auto;
    width: auto;
    height: 13px;
    max-width: 18px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.yatp-drawer {
    --yatp-drawer-panel-width: min(300px, calc(100vw - 52px));
    --yatp-drawer-height: 120px;
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 99999;
    width: 42px;
    height: var(--yatp-drawer-height);
}

.yatp-drawer__toggle {
    position: relative;
    z-index: 2;
    height: 100%;
    box-sizing: border-box;
    transition: transform 240ms ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--yatp-accent-color, #a03a9e);
    color: #f6fffb;
    min-width: 42px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(17, 61, 56, 0.35);
    cursor: pointer;
}

.yatp-drawer__toggle-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.yatp-drawer__toggle-flag {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.yatp-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    height: 100%;
    box-sizing: border-box;
    width: var(--yatp-drawer-panel-width);
    background: var(--yatp-accent-color, #a03a9e);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-right: 0;
    box-shadow: 0 12px 28px rgba(17, 61, 56, 0.35);
    padding: 12px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 240ms ease, opacity 180ms ease;
}

.yatp-drawer.is-open .yatp-drawer__panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.yatp-drawer.is-open .yatp-drawer__toggle {
    transform: translateX(calc(-1 * var(--yatp-drawer-panel-width)));
}

.yatp-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.yatp-drawer__label {
    color: #f6fffb;
    font-weight: 700;
    font-size: 14px;
}

.yatp-drawer__close {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.yatp-shortcode {
    position: relative;
    display: inline-block;
}

.yatp-shortcode__open {
    border: 1px solid rgba(17, 61, 56, 0.2);
    background: var(--yatp-accent-color, #a03a9e);
    color: #ffffff;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.yatp-shortcode__open-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    object-fit: cover;
}

.yatp-modal[hidden] {
    display: none;
}

.yatp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.yatp-modal__overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(8, 20, 26, 0.6);
    cursor: pointer;
}

.yatp-modal__dialog {
    position: relative;
    width: min(420px, calc(100vw - 24px));
    background: var(--yatp-accent-color, #a03a9e);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(8, 20, 26, 0.4);
    padding: 14px;
    animation: yatp-pop-in 220ms ease-out;
}

.yatp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.yatp-modal__label {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
}

.yatp-modal__close {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

@keyframes yatp-pop-in {
    0% {
        transform: translateY(16px) scale(0.96);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .yatp-language-switcher {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .yatp-drawer {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .yatp-drawer__panel {
        width: min(280px, calc(100vw - 52px));
    }

    .yatp-drawer {
        --yatp-drawer-panel-width: min(280px, calc(100vw - 52px));
        --yatp-drawer-height: 116px;
    }
}
