/* =============================================
   SOCIAL LINKS WIDER - CSS COMPLETO
   Estilos modernos e responsivos para widget de redes sociais
   ============================================= */

/* Reset e base */
.slw-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    * {
        box-sizing: border-box;
    }
}

.slw-links {
    display: flex;
    gap: 12px;
}

/* Layout Vertical */
.slw-vertical .slw-links {
    flex-direction: column;
}

/* Layout Horizontal */
.slw-horizontal .slw-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

/* Links base */
.slw-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-height: 52px;
    backdrop-filter: blur(10px);
}

.slw-vertical .slw-link {
    justify-content: flex-start;
}

.slw-horizontal .slw-link {
    justify-content: center;
    min-width: 70px;
    flex: 1;
    text-align: center;
}

/* Estados de hover e focus */
.slw-link:hover,
.slw-link:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    outline: none;
}

.slw-link:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* =============================================
   ÍCONES PNG CORRIGIDOS - USANDO IMG TAG
   ============================================= */

.slw-icon {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    transition: all 0.3s ease;
    display: inline-block;
    flex-shrink: 0;
    filter: brightness(1);
}

.slw-horizontal .slw-icon {
    margin-right: 0;
    margin-bottom: 5px;
}

.slw-link:hover .slw-icon {
    transform: scale(1.3) rotate(5deg);
    filter: brightness(1.2);
}

.slw-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Labels */
.slw-label {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.2px;
    transition: transform 0.3s ease;
}

.slw-horizontal .slw-label {
    display: none;
    font-size: 12px;
}

.slw-link:hover .slw-label {
    transform: translateX(2px);
}

/* =============================================
   ESTATÍSTICAS DO YOUTUBE
   ============================================= */

.slw-youtube-stats {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.9;
    text-align: right;
    line-height: 1.3;
}

.slw-subscribers:before {
    content: "👥 ";
    font-size: 10px;
}

.slw-videos:before {
    content: "🎬 ";
    font-size: 10px;
}

.slw-subscribers,
.slw-videos {
    font-weight: 500;
    white-space: nowrap;
}

/* =============================================
   ESTILO PREENCHIDO (FILLED)
   ============================================= */

.slw-filled .slw-link {
    color: white !important;
    border: none;
    position: relative;
    z-index: 1;
}

.slw-filled .slw-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.slw-filled .slw-link:hover::before {
    left: 100%;
}

/* Gradientes específicos para cada rede social */
.slw-filled .slw-facebook { 
    background: linear-gradient(135deg, #1877F2 0%, #0D5FAD 100%);
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.slw-filled .slw-twitter { 
    background: linear-gradient(135deg, #1DA1F2 0%, #0D8BD9 100%);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.slw-filled .slw-instagram { 
    background: linear-gradient(135deg, #E4405F 0%, #C13584 25%, #833AB4 50%, #5851DB 75%, #405DE6 100%);
    background-size: 200% 200%;
    box-shadow: 0 4px 15px rgba(228, 64, 95, 0.3);
    animation: gradientShift 3s ease infinite;
}

.slw-filled .slw-youtube { 
    background: linear-gradient(135deg, #FF1313 0%, #B50000 100%);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.slw-filled .slw-linkedin { 
    background: linear-gradient(135deg, #0077B5 0%, #005582 100%);
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.slw-filled .slw-tiktok { 
    background: linear-gradient(135deg, #000000 0%, #69C9D0 50%, #EE1D52 100%);
    background-size: 200% 200%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: gradientShift 3s ease infinite;
}

.slw-filled .slw-github { 
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    box-shadow: 0 4px 15px rgba(51, 51, 51, 0.3);
}

.slw-filled .slw-discord { 
    background: linear-gradient(135deg, #6873EA 0%, #3640AC 100%);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.slw-filled .slw-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* =============================================
   ESTILO CONTORNO (OUTLINE)
   ============================================= */

.slw-outline .slw-link {
    background: transparent;
    border: 2px solid;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
}

/* Cores específicas para outline */
.slw-outline .slw-facebook { 
    color: #1877F2; 
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.05);
}

.slw-outline .slw-twitter { 
    color: #1DA1F2; 
    border-color: #1DA1F2;
    background: rgba(29, 161, 242, 0.05);
}

.slw-outline .slw-instagram { 
    color: #E4405F; 
    border-color: #E4405F;
    background: rgba(228, 64, 95, 0.05);
}

.slw-outline .slw-youtube { 
    color: #FF0000; 
    border-color: #FF0000;
    background: rgba(255, 0, 0, 0.05);
}

.slw-outline .slw-linkedin { 
    color: #0077B5; 
    border-color: #0077B5;
    background: rgba(0, 119, 181, 0.05);
}

.slw-outline .slw-tiktok { 
    color: #000000; 
    border-color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

.slw-outline .slw-github { 
    color: #333333; 
    border-color: #333333;
    background: rgba(51, 51, 51, 0.05);
}

.slw-outline .slw-discord { 
    color: #5865F2; 
    border-color: #5865F2;
    background: rgba(88, 101, 242, 0.05);
}

.slw-outline .slw-link:hover {
    color: white !important;
    transform: translateY(-3px) scale(1.02);
    border-color: transparent;
}

/* Hover colors para outline */
.slw-outline .slw-facebook:hover { background: linear-gradient(135deg, #1877F2, #0D5FAD); }
.slw-outline .slw-twitter:hover { background: linear-gradient(135deg, #1DA1F2, #0D8BD9); }
.slw-outline .slw-instagram:hover { background: linear-gradient(135deg, #E4405F, #C13584, #833AB4); }
.slw-outline .slw-youtube:hover { background: linear-gradient(135deg, #FF0000, #CC0000); }
.slw-outline .slw-linkedin:hover { background: linear-gradient(135deg, #0077B5, #005582); }
.slw-outline .slw-tiktok:hover { background: linear-gradient(135deg, #000000, #69C9D0, #EE1D52); }
.slw-outline .slw-github:hover { background: linear-gradient(135deg, #333333, #000000); }
.slw-outline .slw-discord:hover { background: linear-gradient(135deg, #5865F2, #4752C4); }

/* =============================================
   ESTATÍSTICAS DO DISCORD
   ============================================= */

.slw-discord-stats {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.9;
    text-align: right;
    line-height: 1.3;
}

.slw-stats-loading {
    font-style: italic;
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
}

.slw-stats-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.slw-members:before {
    content: "👥 ";
    font-size: 10px;
}

.slw-online:before {
    content: "🟢 ";
    font-size: 10px;
}

.slw-members,
.slw-online {
    font-weight: 500;
    white-space: nowrap;
}

/* =============================================
   ANIMAÇÕES E EFEITOS
   ============================================= */

@keyframes slwFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255,255,255,0.3); }
    50% { box-shadow: 0 0 20px rgba(255,255,255,0.6); }
    100% { box-shadow: 0 0 5px rgba(255,255,255,0.3); }
}

/* Animações de entrada */
.slw-link {
    animation: slwFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.slw-link:nth-child(1) { animation-delay: 0.1s; }
.slw-link:nth-child(2) { animation-delay: 0.2s; }
.slw-link:nth-child(3) { animation-delay: 0.3s; }
.slw-link:nth-child(4) { animation-delay: 0.4s; }
.slw-link:nth-child(5) { animation-delay: 0.5s; }
.slw-link:nth-child(6) { animation-delay: 0.6s; }
.slw-link:nth-child(7) { animation-delay: 0.7s; }
.slw-link:nth-child(8) { animation-delay: 0.8s; }

/* Efeito de brilho no hover */
.slw-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.slw-link:hover::after {
    left: 100%;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */

/* Tablets */
@media (max-width: 1024px) {
    .slw-links {
        gap: 10px;
    }
    
    .slw-link {
        padding: 12px 15px;
        min-height: 48px;
    }
    
    .slw-icon {
        width: 20px;
        height: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .slw-horizontal .slw-links {
        flex-direction: column;
    }
    
    .slw-horizontal .slw-label {
        display: block;
        font-size: 13px;
    }
    
    .slw-horizontal .slw-icon {
        margin-right: 10px;
        margin-bottom: 0;
    }
    
    .slw-link {
        padding: 12px 16px;
        min-height: 46px;
    }
    
    .slw-links {
        gap: 8px;
    }
    
    .slw-discord-stats {
        font-size: 10px;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .slw-link {
        padding: 10px 14px;
        min-height: 44px;
    }
    
    .slw-icon {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }
    
    .slw-label {
        font-size: 13px;
    }
    
    .slw-discord-stats {
        font-size: 9px;
    }
    
    .slw-links {
        gap: 6px;
    }
}

/* =============================================
   ESTADOS ESPECIAIS
   ============================================= */

/* Modo escuro (se o tema suportar) */
@media (prefers-color-scheme: dark) {
    .slw-outline .slw-link {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Foco para acessibilidade */
.slw-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Loading state */
.slw-widget.loading .slw-link {
    pointer-events: none;
    opacity: 0.7;
}

/* Estado vazio/placeholder */
.slw-links:empty::before {
    content: 'Configure as redes sociais nas opções do widget';
    display: block;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* =============================================
   UTILITÁRIOS
   ============================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .slw-link {
        border-width: 3px;
    }
    
    .slw-filled .slw-link {
        border: 2px solid white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .slw-link,
    .slw-icon,
    .slw-label {
        animation: none;
        transition: none;
    }
    
    .slw-filled .slw-instagram,
    .slw-filled .slw-tiktok {
        animation: none;
    }
}

/* Print styles */
@media print {
    .slw-widget {
        break-inside: avoid;
    }
    
    .slw-link {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: white !important;
    }
    
    .slw-icon {
        filter: grayscale(100%) brightness(0%);
    }
}