/* Default relative positioning if not in breadcrumbs (fallback) */
.gio-share-container {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    z-index: 20;
}

/* Force breadcrumbs to be flex container to allow right alignment */
.ct-breadcrumbs {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping if space is tight */
}

/* Styles when injected into breadcrumbs */
.gio-share-container.gio-in-breadcrumbs {
    margin-left: auto;
    /* Push to the right in flex container */
    display: flex;
    align-items: center;
}

.gio-share-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gio-share-trigger:hover {
    background-color: transparent;
    transform: scale(1.1);
}

.gio-share-trigger svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}

.gio-share-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin-top: 8px;
    z-index: 30;
    text-align: left;
}

.gio-share-menu.active {
    display: block;
    animation: gioFadeIn 0.2s ease-out;
}

@keyframes gioFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gio-share-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s;
    gap: 10px;
}

.gio-share-item:hover {
    background-color: #f5f5f5;
    color: #000;
}

.gio-share-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Toast Notification (Reuse existing) */
.gio-share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    color: #fff;
    opacity: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background-color: var(--theme-palette-color-3, #2ecc71);
}

.gio-share-toast.show {
    animation: gioSlideUpFade 0.5s forwards, gioSlideDownFade 0.5s forwards 4s;
}

@keyframes gioSlideUpFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes gioSlideDownFade {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
}