
.oo-textbox {
    width: 100%;
}

/* ── Input-Wrapper ────────────────────────────────────────── */

.oo-textbox--input-wrapper {
    position: relative;
}

    .oo-textbox--input-wrapper .form--input {
        width: 100%;
    }

/* ── Button-Bereich (absolut positionierter Flex-Container) ── */

.oo-textbox--actions {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    pointer-events: none;
}

    .oo-textbox--actions > * {
        pointer-events: auto;
    }

/* ── Einheitliche Icon-Buttons ─────────────────────────────── */

.oo-textbox--icon-btn {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--oo-radius-sm);
    color: var(--oo-color-text-subtle);
    padding: 0;
    transition: background var(--oo-transition), color var(--oo-transition);
}

    .oo-textbox--icon-btn .oo-icon {
        font-size: 1.1rem;
        line-height: 1;
    }

    .oo-textbox--icon-btn .oo-svg-icon {
        width: 1.25rem;
        height: 1.25rem;
        fill: currentColor;
    }

    .oo-textbox--icon-btn:hover {
        background: rgba(0, 0, 0, 0.06);
        color: var(--oo-color-text);
    }

    .oo-textbox--icon-btn:focus-visible {
        outline: 2px solid var(--oo-primary);
        outline-offset: -2px;
    }

/* Modifier: Danger (z.B. Clear-Button) */
.oo-textbox--icon-btn--danger:hover {
    color: var(--oo-danger);
    background: transparent;
}

/* Modifier: Success-Feedback (z.B. Copy-Button nach Klick) */
.oo-textbox--icon-btn--success {
    color: var(--oo-success, #22c55e);
}

    .oo-textbox--icon-btn--success:hover {
        color: var(--oo-success, #22c55e);
        background: transparent;
    }

/* ── Paste-Image Thumbnails ──────────────────────────────────────────────── */

/* Neutraler Block-Wrapper wenn PasteImage aktiv – KEIN Flex, damit die innere
   form--group (position: relative) ihr Floating-Label-Anchoring behält.
   Thumbnails liegen als echte Geschwister ober-/unterhalb. */
.oo-textbox--paste-wrapper {
    width: 100%;
}
.oo-textbox--paste-images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oo-space-2, 0.5rem);
    margin-top: var(--oo-space-2, 0.5rem);
}

/* Above: Thumbnails stehen vor der form--group → Abstand nach unten statt oben */
.oo-textbox--paste-wrapper > .oo-textbox--paste-images:first-child {
    margin-top: 0;
    margin-bottom: var(--oo-space-2, 0.5rem);
}

.oo-textbox--paste-image-item {
    position: relative;
    display: inline-flex;
    border: var(--oo-border-width, 1px) solid var(--oo-color-border, #d1d5db);
    border-radius: var(--oo-radius-md, 6px);
    overflow: hidden;
}

    .oo-textbox--paste-image-item img {
        display: block;
        max-width: 120px;
        max-height: 80px;
        object-fit: contain;
    }

    .oo-textbox--paste-image-item:hover .oo-textbox--paste-image-remove {
        opacity: 1;
    }

.oo-textbox--paste-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--oo-radius-sm, 4px);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    line-height: 1;
}

    .oo-textbox--paste-image-remove:hover {
        background: rgba(0, 0, 0, 0.8);
    }

    .oo-textbox--paste-image-remove .oo-svg-icon {
        width: 0.8rem;
        height: 0.8rem;
        fill: currentColor;
    }
