/* ===================================
   Minimal Share Button (Near Format Badges)
   =================================== */

/* Container for format badges + share button */
.swj-book-format {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Share Button */
.swj-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    margin-left: 4px;
}

.swj-share-button:hover {
    background: #F7F8F8;
    border-color: #C7C7C7;
    transform: translateY(-1px);
}

.swj-share-button:active {
    transform: translateY(0);
}

/* Share Icon - Using simple SVG */
.swj-share-icon {
    width: 16px;
    height: 16px;
    stroke: #565959;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.swj-share-button:hover .swj-share-icon {
    stroke: #0F1111;
}

/* Share Dropdown Menu */
.swj-share-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.swj-share-button.active .swj-share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Share Menu Items */
.swj-share-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #0F1111;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

.swj-share-menu a:hover {
    background: #F7F8F8;
}

.swj-share-menu-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Copy Link Success Message */
.swj-share-copied {
    position: absolute;
    top: -35px;
    right: 0;
    background: #0F1111;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.swj-share-copied.show {
    opacity: 1;
    visibility: visible;
}

.swj-share-copied::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #0F1111;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .swj-share-menu {
        right: auto;
        left: 0;
    }
    
    .swj-share-copied {
        right: auto;
        left: 0;
    }
    
    .swj-share-copied::after {
        right: auto;
        left: 12px;
    }
}
