.share-block {
    position: relative;
    display: inline-block;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    user-select: none;
    position: relative;
    z-index: 1;
}

.share-button:hover {
    background: #ebebeb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.share-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.share-popup {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 16px 18px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    transform-origin: top center;
    transform: translateX(-50%) scale(0.96) translateY(-4px);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.share-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1) translateY(0);
}

.share-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: white;
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px 0 0 0;
}

.share-services {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 4px 0;
}

.share-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
    font-size: 11px;
    font-weight: 500;
    transition: transform 0.15s;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 4px 6px;
    border-radius: 8px;
    min-width: 56px;
    position: relative;
    z-index: 2;
    max-width: 70px;
}

.share-service:hover {
    transform: translateY(-2px);
    background: #f8f9fa;
}

.share-service .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
    color: white;
    font-size: 20px;
}

.share-service:hover .icon-circle {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.share-service span {
    line-height: 1.2;
    color: #555;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.service-copy .icon-circle { background: #6c757d; }
.service-vkontakte .icon-circle { background: #0077FF; }
.service-odnoklassniki .icon-circle { background: #F58220; }
.service-telegram .icon-circle { background: #64A9DC; }
.service-whatsapp .icon-circle { background: #65BC54; }
.service-max .icon-circle { background: #5B2EEB; }

/* --- Уведомление о копировании --- */
.copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

.copy-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 500px) {
    .share-block { width: 100%; }
    .share-button { margin: 0 auto; }
    .share-popup { min-width: 250px; padding: 14px 12px; }
    .share-service .icon-circle { width: 38px; height: 38px; font-size: 17px; }
    .share-service { min-width: 48px; }
    .copy-notification { 
        white-space: normal;
        max-width: 90%;
        font-size: 13px;
        padding: 10px 18px;
        text-wrap: nowrap;
    }
}