.ztk-ajax-notice {
    display: inline-flex;
    max-width: 100%;
    vertical-align: middle;
}

.ztk-ajax-notice .ztk-ajax-notice__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 36px;
    gap: 0.4em;
    cursor: pointer;
}

.ztk-ajax-notice .ztk-ajax-notice__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ztk-keyboard-notice-region {
    position: fixed;
    z-index: 999999;
    top: max(72px, calc(env(safe-area-inset-top, 0px) + 18px));
    left: 50%;
    width: min(92vw, 430px);
    pointer-events: none;
    transform: translateX(-50%);
}

.ztk-keyboard-notice {
    --ztk-keyboard-notice-color: #f59e0b;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    overflow: hidden;
    color: #253044;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(31, 41, 55, 0.1);
    border-radius: 13px;
    box-shadow: 0 14px 42px rgba(32, 43, 67, 0.2);
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    transition: opacity 180ms ease, transform 180ms ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ztk-keyboard-notice::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--ztk-keyboard-notice-color);
    content: "";
}

.ztk-keyboard-notice.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ztk-keyboard-notice__icon {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: #fff;
    background: var(--ztk-keyboard-notice-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.18);
}

.ztk-keyboard-notice__icon::before {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    content: "!";
    transform: translate(-50%, -52%);
}

.ztk-keyboard-notice__text {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ztk-keyboard-notice--success {
    --ztk-keyboard-notice-color: #22a06b;
}

.ztk-keyboard-notice--info {
    --ztk-keyboard-notice-color: #3b82f6;
}

.ztk-keyboard-notice--danger {
    --ztk-keyboard-notice-color: #ef4444;
}

body.dark-theme .ztk-keyboard-notice,
body.dark-mode .ztk-keyboard-notice,
body.night-theme .ztk-keyboard-notice,
body.theme-dark .ztk-keyboard-notice,
html.dark-theme .ztk-keyboard-notice,
html.dark-mode .ztk-keyboard-notice,
html[data-theme="dark"] .ztk-keyboard-notice,
[data-theme="dark"] .ztk-keyboard-notice {
    color: #edf2fb;
    background: rgba(25, 30, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
}

@media (prefers-color-scheme: dark) {
    .ztk-keyboard-notice {
        color: #edf2fb;
        background: rgba(25, 30, 42, 0.96);
        border-color: rgba(255, 255, 255, 0.11);
        box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
    }
}

@media (max-width: 480px) {
    .ztk-keyboard-notice-region {
        top: max(58px, calc(env(safe-area-inset-top, 0px) + 12px));
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ztk-keyboard-notice,
    .ztk-ajax-notice .ztk-ajax-notice__button {
        transition: none !important;
    }
}
