.ah-direct-toolbar {
    position: fixed;
    top: 92px;
    right: 20px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(17, 24, 39, .94);
    box-shadow: 0 16px 44px rgba(15, 23, 42, .34);
    color: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ah-direct-toolbar button {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background .18s ease, transform .18s ease;
}

.ah-direct-toolbar button:hover {
    background: rgba(255, 255, 255, .18);
    transform: translateY(-1px);
}

.ah-direct-toolbar button:disabled {
    cursor: wait;
    opacity: .7;
    transform: none;
}

.ah-direct-toolbar .ah-direct-primary {
    background: #16a34a;
}

.ah-direct-toolbar .ah-direct-primary:hover {
    background: #15803d;
}

.ah-direct-toolbar .ah-direct-danger {
    background: #dc2626;
}

.ah-direct-toolbar .ah-direct-danger:hover {
    background: #b91c1c;
}

.ah-direct-toolbar .ah-direct-hidden,
.ah-direct-hidden {
    display: none !important;
}

.ah-direct-status {
    max-width: 150px;
    overflow: hidden;
    padding: 0 6px;
    color: #d1d5db;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ah-direct-editing [data-ah-editable-text] {
    border-radius: 4px;
    outline: 1px dashed rgba(22, 163, 74, .5);
    outline-offset: 3px;
    cursor: text;
}

body.ah-direct-editing [data-ah-editable-text]:focus {
    background: rgba(240, 253, 244, .92);
    outline: 2px solid #16a34a;
    outline-offset: 4px;
}

body.ah-direct-editing img[data-ah-editable-image],
body.ah-direct-editing a[data-ah-editable-link] {
    outline: 2px dashed rgba(37, 99, 235, .6);
    outline-offset: 4px;
}

body.ah-direct-editing img[data-ah-editable-image] {
    cursor: pointer;
}

body.ah-direct-editing a[data-ah-editable-link] {
    cursor: text;
}

.ah-direct-toast {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 100001;
    max-width: calc(100vw - 40px);
    padding: 12px 14px;
    border-radius: 12px;
    background: #111827;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .32);
    color: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}

.ah-direct-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ah-direct-toast.is-error {
    background: #991b1b;
}

.ah-direct-image-button {
    position: fixed;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .25);
    color: #fff;
    cursor: pointer;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ah-direct-image-button:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .ah-direct-toolbar {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .ah-direct-status {
        order: -1;
        width: 100%;
        max-width: none;
        text-align: center;
    }
}
