/**
 * CG Vertical Share Buttons - Frontend Styles
 */

/* Widget container */
.wpstudio-cg-vertical-share-widget {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* RTL support */
.wpstudio-cg-vertical-share-rtl {
    left: auto;
    right: 20px;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .wpstudio-cg-vertical-share-hide-mobile {
        display: none !important;
    }
}

/* Share button base */
.wpstudio-cg-vertical-share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid currentColor;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wpstudio-cg-vertical-share-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Icon container */
.wpstudio-cg-vertical-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.wpstudio-cg-vertical-share-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Platform colors - outline style */
.wpstudio-cg-vertical-share-facebook {
    color: #1877F2;
}

.wpstudio-cg-vertical-share-twitter {
    color: #1DA1F2;
}

.wpstudio-cg-vertical-share-linkedin {
    color: #0077B5;
}

.wpstudio-cg-vertical-share-whatsapp {
    color: #25D366;
}

.wpstudio-cg-vertical-share-chatgpt {
    color: #10A37F;
}

.wpstudio-cg-vertical-share-perplexity {
    color: #6366F1;
}

.wpstudio-cg-vertical-share-claude {
    color: #FF6B35;
}

/* Hover states - fill with color */
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:hover {
    transform: translateX(4px) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-facebook:hover {
    background: #1877F2;
    color: #fff;
    border-color: #1877F2;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-twitter:hover {
    background: #1DA1F2;
    color: #fff;
    border-color: #1DA1F2;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-linkedin:hover {
    background: #0077B5;
    color: #fff;
    border-color: #0077B5;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-whatsapp:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-chatgpt:hover {
    background: #10A37F;
    color: #fff;
    border-color: #10A37F;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-perplexity:hover {
    background: #6366F1;
    color: #fff;
    border-color: #6366F1;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-claude:hover {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
}

/* Click animation */
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:active {
    transform: translateX(2px) scale(0.95);
}

/* RTL hover direction */
.wpstudio-cg-vertical-share-rtl.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:hover {
    transform: translateX(-4px) scale(1.08);
}

.wpstudio-cg-vertical-share-rtl.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:active {
    transform: translateX(-2px) scale(0.95);
}

/* Entrance animation */
@keyframes wpstudioShareSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button {
    animation: wpstudioShareSlideIn 0.4s ease-out backwards;
}

.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(1) { animation-delay: 0.1s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(2) { animation-delay: 0.15s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(3) { animation-delay: 0.2s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(4) { animation-delay: 0.25s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(5) { animation-delay: 0.3s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(6) { animation-delay: 0.35s; }
.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button:nth-child(7) { animation-delay: 0.4s; }

/* RTL entrance animation */
.wpstudio-cg-vertical-share-rtl.wpstudio-cg-vertical-share-animated .wpstudio-cg-vertical-share-button {
    animation-name: wpstudioShareSlideInRTL;
}

@keyframes wpstudioShareSlideInRTL {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tooltip on hover */
.wpstudio-cg-vertical-share-button::before {
    content: attr(title);
    position: absolute;
    left: 100%;
    margin-left: 12px;
    padding: 8px 12px;
    background: #1a202c;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-4px);
}

.wpstudio-cg-vertical-share-button::after {
    content: '';
    position: absolute;
    left: 100%;
    margin-left: 4px;
    border: 6px solid transparent;
    border-right-color: #1a202c;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.wpstudio-cg-vertical-share-button:hover::before,
.wpstudio-cg-vertical-share-button:hover::after {
    opacity: 1;
}

.wpstudio-cg-vertical-share-button:hover::before {
    transform: translateX(0);
}

/* RTL tooltip */
.wpstudio-cg-vertical-share-rtl .wpstudio-cg-vertical-share-button::before {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 12px;
    transform: translateX(4px);
}

.wpstudio-cg-vertical-share-rtl .wpstudio-cg-vertical-share-button::after {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 4px;
    border-right-color: transparent;
    border-left-color: #1a202c;
}

.wpstudio-cg-vertical-share-rtl .wpstudio-cg-vertical-share-button:hover::before {
    transform: translateX(0);
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wpstudio-cg-vertical-share-button,
    .wpstudio-cg-vertical-share-button::before {
        transition: none;
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wpstudio-cg-vertical-share-button {
        border-width: 3px;
    }
}
