/**
 * Frontend Styles for WBL Social Links
 * Unified class naming: wbl-social-* for consistency
 */

/* ========================================
   BASE CONTAINER
   ======================================== */

.wbl-social-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

/* ========================================
   ALIGNMENT
   ======================================== */

.wbl-social-align-left {
    justify-content: flex-start;
}

.wbl-social-align-center {
    justify-content: center;
}

.wbl-social-align-right {
    justify-content: flex-end;
}

.wbl-social-align-space-between {
    justify-content: space-between;
}

/* ========================================
   GAP SIZES
   ======================================== */

.wbl-social-gap-small {
    gap: 0.5rem;
}

.wbl-social-gap-medium {
    gap: 1rem;
}

.wbl-social-gap-large {
    gap: 1.5rem;
}

/* ========================================
   SOCIAL ITEM & LINK
   ======================================== */

.wbl-social-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wbl-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wbl-social-link:hover {
    text-decoration: none;
}

/* ========================================
   ICON WRAPPER
   ======================================== */

.wbl-social-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wbl-social-icon {
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SVG Icon Support */
.wbl-social-icon-wrapper svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.wbl-social-icon-wrapper svg.wbl-social-icon {
    width: 24px;
    height: 24px;
}

/* FontAwesome Icon Support */
.wbl-social-icon-wrapper i {
    font-size: 1.25rem;
}

/* ========================================
   LABEL STYLES
   ======================================== */

.wbl-social-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.3s ease;
}

.wbl-social-link:hover .wbl-social-label {
    color: var(--brand-color);
}

/* ========================================
   SIZE VARIANTS
   ======================================== */

/* Small Size */
.wbl-social-size-small .wbl-social-icon-wrapper {
    width: 2rem;
    height: 2rem;
}

.wbl-social-size-small .wbl-social-icon-wrapper svg.wbl-social-icon {
    width: 16px;
    height: 16px;
}

.wbl-social-size-small .wbl-social-icon-wrapper i {
    font-size: 0.875rem;
}

/* Medium Size (Default) */
.wbl-social-size-medium .wbl-social-icon-wrapper {
    width: 2.75rem;
    height: 2.75rem;
}

.wbl-social-size-medium .wbl-social-icon-wrapper svg.wbl-social-icon {
    width: 24px;
    height: 24px;
}

.wbl-social-size-medium .wbl-social-icon-wrapper i {
    font-size: 1.25rem;
}

/* Large Size */
.wbl-social-size-large .wbl-social-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
}

.wbl-social-size-large .wbl-social-icon-wrapper svg.wbl-social-icon {
    width: 32px;
    height: 32px;
}

.wbl-social-size-large .wbl-social-icon-wrapper i {
    font-size: 1.75rem;
}

/* Extra Large Size */
.wbl-social-size-xlarge .wbl-social-icon-wrapper {
    width: 4.5rem;
    height: 4.5rem;
}

.wbl-social-size-xlarge .wbl-social-icon-wrapper svg.wbl-social-icon {
    width: 40px;
    height: 40px;
}

.wbl-social-size-xlarge .wbl-social-icon-wrapper i {
    font-size: 2.25rem;
}

/* ========================================
   STYLE VARIANTS
   ======================================== */

/* Circle Style */
.wbl-social-style-circle .wbl-social-icon-wrapper {
    border-radius: 50%;
    background-color: var(--brand-color);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.wbl-social-style-circle .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.wbl-social-style-circle .wbl-social-link:active .wbl-social-icon-wrapper {
    transform: translateY(-2px) scale(1.05);
}

/* Rounded Style */
.wbl-social-style-rounded .wbl-social-icon-wrapper {
    border-radius: 0.75rem;
    background-color: var(--brand-color);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.wbl-social-style-rounded .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: translateY(-4px) rotate(5deg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.wbl-social-style-rounded .wbl-social-link:active .wbl-social-icon-wrapper {
    transform: translateY(-2px) rotate(2deg);
}

/* Flat Style */
.wbl-social-style-flat .wbl-social-icon-wrapper {
    border-radius: 0.5rem;
    background-color: transparent;
    color: var(--brand-color);
    border: 2px solid var(--brand-color);
}

.wbl-social-style-flat .wbl-social-link:hover .wbl-social-icon-wrapper {
    background-color: var(--brand-color);
    color: #ffffff;
    transform: scale(1.1);
}

.wbl-social-style-flat .wbl-social-link:active .wbl-social-icon-wrapper {
    transform: scale(1.05);
}

/* Minimal Style */
.wbl-social-style-minimal .wbl-social-icon-wrapper {
    background-color: transparent;
    color: var(--brand-color);
    border-radius: 0;
}

.wbl-social-style-minimal .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Glassmorphism Style */
.wbl-social-style-glass .wbl-social-icon-wrapper {
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--brand-color);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.wbl-social-style-glass .wbl-social-link:hover .wbl-social-icon-wrapper {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Gradient Style */
.wbl-social-style-gradient .wbl-social-icon-wrapper {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-color-dark, var(--brand-color)) 100%);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.wbl-social-style-gradient .wbl-social-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.wbl-social-style-gradient .wbl-social-link:hover .wbl-social-icon-wrapper::before {
    left: 100%;
}

.wbl-social-style-gradient .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* ========================================
   HOVER ANIMATIONS
   ======================================== */

/* Grow */
.wbl-hover-grow .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: scale(1.1);
}

/* Shrink */
.wbl-hover-shrink .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: scale(0.9);
}

/* Pulse */
@keyframes wbl-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.wbl-hover-pulse .wbl-social-link:hover .wbl-social-icon-wrapper {
    animation: wbl-pulse 0.5s ease-in-out;
}

/* Bounce */
@keyframes wbl-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.wbl-hover-bounce .wbl-social-link:hover .wbl-social-icon-wrapper {
    animation: wbl-bounce 0.5s ease;
}

/* Float */
.wbl-hover-float .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: translateY(-5px);
}

/* Rotate */
.wbl-hover-rotate .wbl-social-link:hover .wbl-social-icon-wrapper {
    transform: rotate(360deg);
}

/* Wobble */
@keyframes wbl-wobble {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.wbl-hover-wobble .wbl-social-link:hover .wbl-social-icon-wrapper {
    animation: wbl-wobble 0.5s ease;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .wbl-social-list {
        justify-content: center;
    }

    .wbl-social-size-large .wbl-social-icon-wrapper,
    .wbl-social-size-xlarge .wbl-social-icon-wrapper {
        width: 3rem;
        height: 3rem;
    }

    .wbl-social-size-large .wbl-social-icon-wrapper svg.wbl-social-icon,
    .wbl-social-size-xlarge .wbl-social-icon-wrapper svg.wbl-social-icon {
        width: 24px;
        height: 24px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.wbl-social-link:focus {
    outline: 2px solid var(--brand-color);
    outline-offset: 4px;
    border-radius: 0.5rem;
}

.wbl-social-link:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    .wbl-social-label {
        color: #e5e7eb;
    }

    .wbl-social-style-glass .wbl-social-icon-wrapper {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* ========================================
   ELEMENTOR WIDGET SPECIFIC
   ======================================== */

.wbl-social-widget {
    width: 100%;
}

.wbl-social-widget .wbl-social-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Ensure Elementor controls override base styles */
.elementor-widget-wbl_social_links .wbl-social-icon-wrapper {
    box-sizing: border-box;
}