/**
 * Widget: Social Links - Estilos Completos
 * Botones expandibles de redes sociales
 */

/* ==================== ESTRUCTURA BASE ==================== */

/* Grupos de botones */
.social-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    overflow: visible;
}

/* Separador visual entre grupos */
.social-group-actions,
.social-group-share {
    padding-left: 0.75rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .social-group-actions,
[data-theme="dark"] .social-group-share {
    border-left-color: rgba(255, 255, 255, 0.1);
}

/* Item social - Botón expandible */
.social-item {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    overflow: visible;
}

/* Botón social - pequeño, se agranda en hover */
.social-button {
    position: relative;
    height: 44px;
    width: 44px;
    padding: 0;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

/* Todo el contenido del botón no captura eventos */
.social-button * {
    pointer-events: none;
}

.social-button i,
.social-button svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

/* Label oculto por defecto */
.social-label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
}

/* ==================== INTERACCIONES ==================== */

/* Hover - botón se agranda */
.social-item:hover .social-button,
.social-item:focus .social-button {
    width: auto;
    padding: 0 16px;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                gap 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                box-shadow 0.3s ease;
}

.social-item:hover .social-label,
.social-item:focus .social-label {
    max-width: 300px;
    opacity: 1;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                opacity 0.25s ease 0.2s;
}

/* Focus visible para accesibilidad */
.social-item:focus-visible .social-button {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== COLORES DE REDES SOCIALES ==================== */

.social-facebook {
    background-color: #1877f2;
}

.social-facebook:hover {
    background-color: #0c63d4;
}

.social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-twitter {
    background-color: #000000;
}

.social-twitter:hover {
    background-color: #1a1a1a;
}

.social-youtube {
    background-color: #ff0000;
}

.social-youtube:hover {
    background-color: #cc0000;
}

.social-tiktok {
    background-color: #000000;
}

.social-tiktok:hover {
    background-color: #1a1a1a;
}

.social-whatsapp {
    background-color: #25d366;
}

.social-whatsapp:hover {
    background-color: #1da851;
}

.social-email {
    background-color: #ea4335;
}

.social-email:hover {
    background-color: #c5221f;
}

.social-custom {
    background-color: var(--secondary-color);
}

.social-share {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.social-item:hover .social-share {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== SVG Icons ==================== */
.social-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */

/* DESKTOP: Botones más grandes */
@media (min-width: 1024px) {
    #socialLinksContainer {
        gap: 0.625rem;
    }

    .social-group {
        gap: 0.625rem;
    }

    .social-group-actions,
    .social-group-share {
        padding-left: 1rem;
        margin-left: 0.25rem;
    }

    .social-button {
        height: 48px;
        min-width: 48px;
        border-radius: 24px;
        padding: 0 14px;
    }

    .social-button i,
    .social-button svg {
        width: 22px !important;
        height: 22px !important;
    }

    .social-label {
        font-size: 14px;
    }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 1023px) {
    .social-button {
        height: 46px;
        min-width: 46px;
    }

    .social-button i,
    .social-button svg {
        width: 21px !important;
        height: 21px !important;
    }
}
