/**
 * KFZ-Web Social Sharing ("Teilen")
 *
 * Farben/Radien aus dem Token-System (includes/Design/Tokens.php), keine
 * Hex-Literale. Die Buttons sind neutral und heben beim Hover auf die
 * Markenfarbe — konsistent mit dem restlichen Plugin statt externer Brand-Farben.
 */

.kfzweb-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--kfzweb-space-2);
    margin: var(--kfzweb-space-5) 0;
}

.kfzweb-share__label {
    font-weight: var(--kfzweb-font-semibold);
    margin-right: var(--kfzweb-space-1);
    color: var(--kfzweb-text);
}

.kfzweb-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--kfzweb-radius-full);
    border: 1px solid var(--kfzweb-border);
    background: var(--kfzweb-gray-100);
    color: var(--kfzweb-text);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--kfzweb-transition-fast),
                background-color var(--kfzweb-transition-fast),
                color var(--kfzweb-transition-fast);
}

.kfzweb-share__btn:hover {
    transform: translateY(-1px);
    background: var(--kfzweb-primary);
    color: var(--kfzweb-white);
}

.kfzweb-share__btn--copied {
    background: var(--kfzweb-success);
    color: var(--kfzweb-white);
}

/* „Link kopieren"-Button braucht relative Positionierung für das Tooltip. */
.kfzweb-share__btn--copy {
    position: relative;
    overflow: visible;
}

/* „Kopiert!"-Tooltip — erscheint nur im --copied-Zustand. */
.kfzweb-share__copied-tip {
    position: absolute;
    bottom: calc(100% + var(--kfzweb-space-2));
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: var(--kfzweb-space-1) var(--kfzweb-space-2);
    border-radius: var(--kfzweb-radius-sm);
    background: var(--kfzweb-success);
    color: var(--kfzweb-white);
    font-size: var(--kfzweb-text-sm);
    font-weight: var(--kfzweb-font-semibold);
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--kfzweb-transition-fast),
                transform var(--kfzweb-transition-fast);
}
.kfzweb-share__btn--copied .kfzweb-share__copied-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* aria-live-Region für Screenreader — visuell verborgen. */
.kfzweb-share__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
